MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IRM: Infra-Red Modulator driver

Overview

The MCUXpresso SDK provides a Infra-Red Modulator driver for MCUXpresso SDK devices.

Files

file  fsl_cic_irb.h
 
file  fsl_cic_irb_private.h
 

Data Structures

struct  cic_irb_config_t
 
struct  cic_irb_instance_data_t
 

Enumerations

enum  cic_irb_protocols_t
 
enum  cic_irb_status_t
 
enum  cic_irb_carrier_frequency_t
 
enum  cic_irb_sirc_version_t
 
enum  cic_irb_rcmm_mode_t
 
enum  cic_irb_rcmm_signal_free_time_t
 

CIC_IRB Get Default Configuration

cic_irb_status_t CIC_IRB_GetDefaultConfig (cic_irb_config_t *config)
 CIC_IRB_GetDefaultConfig. More...
 

CIC_IRB Initialization

cic_irb_status_t CIC_IRB_Init (CIC_IRB_Type *base, cic_irb_config_t *config)
 CIC_IRB_Init. More...
 

CIC_IRB Enable

cic_irb_status_t CIC_IRB_Enable (CIC_IRB_Type *base)
 CIC_IRB_Enable. More...
 

CIC_IRB Send RC5 Packet

cic_irb_status_t CIC_IRB_SendRC5Packet (CIC_IRB_Type *base, bool toggle, uint8_t address, uint8_t command)
 CIC_IRB_SendRC5Packet. More...
 

CIC_IRB Send RC6 Packet

cic_irb_status_t CIC_IRB_SendRC6Packet (CIC_IRB_Type *base, bool toggle, uint8_t field, uint8_t address, uint8_t command)
 CIC_IRB_SendRC6Packet. More...
 

CIC_IRB Send SIRC Packet

cic_irb_status_t CIC_IRB_SendSIRCPacket (CIC_IRB_Type *base, cic_irb_sirc_version_t version, uint8_t command, uint8_t address, uint8_t extendedBits)
 CIC_IRB_SendSIRCPacket. More...
 

CIC_IRB Send RCMM Packet

cic_irb_status_t CIC_IRB_SendRCMMPacket (CIC_IRB_Type *base, cic_irb_rcmm_mode_t mode, uint8_t modeBits, uint8_t address, uint8_t customerId, uint32_t data, cic_irb_rcmm_signal_free_time_t signalFreeTime)
 CIC_IRB_SendRCMMPacket. More...
 

CIC_IRB Is Busy

cic_irb_status_t CIC_IRB_IsBusy (CIC_IRB_Type *base, bool *isBusy)
 CIC_IRB_IsBusy. More...
 

CIC_IRB Disable

cic_irb_status_t CIC_IRB_Disable (CIC_IRB_Type *base)
 CIC_IRB_Disable. More...
 

CIC_IRB Deinitializations

cic_irb_status_t CIC_IRB_DeInit (CIC_IRB_Type *base)
 CIC_IRB_DeInit. More...
 

CIC_IRB Get Instance Data

cic_irb_instance_data_tCIC_IRB_GetInstanceData (CIC_IRB_Type *base)
 CIC_IRB_GetInstanceData. More...
 

CIC_IRB RC5 Initialise

void CIC_IRB_RC5Initialise (CIC_IRB_Type *base)
 CIC_IRB_RC5Initialise. More...
 

CIC_IRB RC6 Initialise

void CIC_IRB_RC6Initialise (CIC_IRB_Type *base)
 CIC_IRB_RC6Initialise. More...
 

CIC_IRB SIRC Initialise

void CIC_IRB_SIRCInitialise (CIC_IRB_Type *base)
 CIC_IRB_SIRCInitialise. More...
 

CIC_IRB RCMM Initialise

void CIC_IRB_RCMMInitialise (CIC_IRB_Type *base)
 CIC_IRB_RCMMInitialise. More...
 

CIC_IRB RC5 Get Instance

uint8_t CIC_IRB_GetInstance (CIC_IRB_Type *base)
 CIC_IRB_GetInstance. More...
 

CIC_IRB Load And Send Fifo

void CIC_IRB_LoadAndSendFifo (CIC_IRB_Type *base)
 CIC_IRB_LoadAndSendFifo. More...
 

CIC_IRB RCx Append Envelopes

void CIC_IRB_RCxAppendEnvelopes (uint32_t bitPattern, uint8_t bitCount, cic_irb_instance_data_t *instanceData, uint8_t *previousEnvelopeLevel, int8_t *envelope, bool ManchesterEncodingIEEE802_3)
 CIC_IRB_RCxAppendEnvelopes. More...
 

Data Structure Documentation

struct cic_irb_config_t

CIC IRB configuration structure

This structure holds the configuration settings for the CIC IRB peripheral. To initialize this structure to reasonable defaults, call the CIC_IRB_GetDefaultConfig() function and pass a pointer to the configuration structure instance.

struct cic_irb_instance_data_t

CIC IRB instance data structure

Enumeration Type Documentation

IR protocol types

Status code responses from API calls

Status code responses from API calls

Sony SIRC version types

RC-MM mode types

RC-MM signal free types

Function Documentation

cic_irb_status_t CIC_IRB_GetDefaultConfig ( cic_irb_config_t config)

This function get default configuration for IRB

Parameters
configpointer to a configuration structure
Returns
A cic_irb_status_t status code*
cic_irb_status_t CIC_IRB_Init ( CIC_IRB_Type *  base,
cic_irb_config_t config 
)

Initialize the IRB peripheral. Attaches, configures and enables source and peripheral clocks, resets peripheral and initializes instance data. The peripheral is not enabled after this.

Parameters
baseCIC_IRB peripheral base address
configpointer to a configuration structure
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_Enable ( CIC_IRB_Type *  base)

Enable the IRB peripheral doing protocol specific initializations. The interrupts are enabled after this call.

Parameters
baseCIC_IRB peripheral base address
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_SendRC5Packet ( CIC_IRB_Type *  base,
bool  toggle,
uint8_t  address,
uint8_t  command 
)

Send a RC-5 packet via the IRB peripheral. The peripheral instance must have been initialised and enabled and not busy.

Parameters
baseCIC_IRB peripheral base address
togglethe state of the toggle bit to encode
addressthe 5 bit address to go into the message
commandthe 7 bit command to go into the message
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_SendRC6Packet ( CIC_IRB_Type *  base,
bool  toggle,
uint8_t  field,
uint8_t  address,
uint8_t  command 
)

Send a RC-5 packet via the IRB peripheral. The peripheral instance must have been initialised and enabled and not busy.

Parameters
baseCIC_IRB peripheral base address
togglethe state of the toggle bit to encode
fieldthe 3 bit field to go into the message
addressthe 8 bit address to go into the message
commandthe 8 bit command to go into the message
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_SendSIRCPacket ( CIC_IRB_Type *  base,
cic_irb_sirc_version_t  version,
uint8_t  command,
uint8_t  address,
uint8_t  extendedBits 
)

Send a SIRC packet via the IRB peripheral. The peripheral instance must have been initialised and enabled and not busy.

Parameters
baseCIC_IRB peripheral base address
versionthe version of the protocol to use, varies the packet length command the 7 bit command to go into the message
addressthe 5 or 8 bit address to go into the message
extendedBits8 bits of extra data in 20 bit message
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_SendRCMMPacket ( CIC_IRB_Type *  base,
cic_irb_rcmm_mode_t  mode,
uint8_t  modeBits,
uint8_t  address,
uint8_t  customerId,
uint32_t  data,
cic_irb_rcmm_signal_free_time_t  signalFreeTime 
)

Send a RCMM packet via the IRB peripheral. The peripheral instance must have been initialised and enabled and not busy.

Parameters
baseCIC_IRB peripheral base address The RC-MM message mode. See RC-MM documentation Bits The mode numerical value, varying number of bits
addressRC-MM address data field in some modes
customerIdRC-MM customer if in some modes
datathe RC-MM data field, varying length depending on mode
signalFreeTimeSilent period after packet transmission
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_IsBusy ( CIC_IRB_Type *  base,
bool *  isBusy 
)

Determine if the IRB peripheral instance is in the process of sending the previous message.

Parameters
baseCIC_IRB peripheral base address
isBusypointer to bool for result
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_Disable ( CIC_IRB_Type *  base)

Disable the IRB peripheral such that it can be enabled again without doing another init. This stops interrupts and any part sent message is abandoned.

Parameters
baseCIC_IRB peripheral base address
Returns
A cic_irb_status_t status code
cic_irb_status_t CIC_IRB_DeInit ( CIC_IRB_Type *  base)

De-initialises the IRB peripheral instance. The clock is stopped.

Parameters
baseCIC_IRB peripheral base address
Returns
A cic_irb_status_t status code
cic_irb_instance_data_t* CIC_IRB_GetInstanceData ( CIC_IRB_Type *  base)

Get a pointer to the data structure containing context information for a peripheral instance

Parameters
baseCIC_IRB peripheral base address.
Returns
Pointer to the instance data structure

NOTES: Returns NULL if an instance not found for base

void CIC_IRB_RC5Initialise ( CIC_IRB_Type *  base)

Initialise the peripheral ready to send RC5 messages.

Parameters
baseCIC_IRB peripheral base address.
void CIC_IRB_RC6Initialise ( CIC_IRB_Type *  base)

Initialise the peripheral ready to send RC6 messages.

Parameters
baseCIC_IRB peripheral base address.
void CIC_IRB_SIRCInitialise ( CIC_IRB_Type *  base)

Initialise the peripheral ready to send SIRC messages.

Parameters
baseCIC_IRB peripheral base address.
void CIC_IRB_RCMMInitialise ( CIC_IRB_Type *  base)

Initialise the peripheral ready to send RCMM messages.

Parameters
baseCIC_IRB peripheral base address.
uint8_t CIC_IRB_GetInstance ( CIC_IRB_Type *  base)

Get the CIC_IRB instance from peripheral base address.

Parameters
baseCIC_IRB peripheral base address.
Returns
CIC_IRB instance number.

NOTES: Returns FSL_FEATURE_SOC_CIC_IRB_COUNT if instance for base not found.

void CIC_IRB_LoadAndSendFifo ( CIC_IRB_Type *  base)

Load the FIFO with the first part of a series of envelopes to send. If a message's complete set of envelopes fits within the FIFO size then the whole message will be sent. If not then the maximum number of envelopes is loaded into the FIFO that is possible. Subsequent FIFO loads for the remaining envelopes are loaded into the FIFO in the interrupt handler which is triggered when the FIFO becomes empty.

Parameters
baseCIC_IRB peripheral base address.
void CIC_IRB_RCxAppendEnvelopes ( uint32_t  bitPattern,
uint8_t  bitCount,
cic_irb_instance_data_t instanceData,
uint8_t *  previousEnvelopeLevel,
int8_t *  envelope,
bool  ManchesterEncodingIEEE802_3 
)

Take a bit pattern that comprises part of a RCx message and encode this in envelopes using the appropriate type of Manchester encoding. The envelopes can be appended to an array of previously encoded envelopes or can be a complete message.

Parameters
bitPatternthe binary data to encode into the message
bitCountthe number of bits in bitPattern
instanceDatapointer to the peripheral instance data structure
previousEnvelopeLevelthe level of the last envelope of the preceding part of the encoded message
envelopepointer to array to add this bit pattern's encoded envelopes
ManchesterEncodingIEEE802_3type of Manchester encoding, true for IEEE 802.3, false for Thomas