libctru  v1.6.0
Functions
ir.h File Reference

IR service. More...

Go to the source code of this file.

Functions

Result iruInit (u32 *sharedmem_addr, u32 sharedmem_size)
 Initializes IRU. More...
 
void iruExit (void)
 Shuts down IRU.
 
Handle iruGetServHandle (void)
 Gets the IRU service handle. More...
 
Result iruSendData (u8 *buf, u32 size, bool wait)
 Sends IR data. More...
 
Result iruRecvData (u8 *buf, u32 size, u8 flag, u32 *transfercount, bool wait)
 Receives IR data. More...
 
Result IRU_Initialize (void)
 Initializes the IR session.
 
Result IRU_Shutdown (void)
 Shuts down the IR session.
 
Result IRU_StartSendTransfer (u8 *buf, u32 size)
 Begins sending data. More...
 
Result IRU_WaitSendTransfer (void)
 Waits for a send operation to complete.
 
Result IRU_StartRecvTransfer (u32 size, u8 flag)
 Begins receiving data. More...
 
Result IRU_WaitRecvTransfer (u32 *transfercount)
 Waits for a receive operation to complete. More...
 
Result IRU_SetBitRate (u8 value)
 Sets the IR bit rate. More...
 
Result IRU_GetBitRate (u8 *out)
 Gets the IR bit rate. More...
 
Result IRU_SetIRLEDState (u32 value)
 Sets the IR LED state. More...
 
Result IRU_GetIRLEDRecvState (u32 *out)
 Gets the IR LED state. More...
 

Detailed Description

IR service.

Function Documentation

◆ IRU_GetBitRate()

Result IRU_GetBitRate ( u8 out)

Gets the IR bit rate.

Parameters
outPointer to write the bit rate to.

◆ IRU_GetIRLEDRecvState()

Result IRU_GetIRLEDRecvState ( u32 out)

Gets the IR LED state.

Parameters
outPointer to write the IR LED state to.

◆ IRU_SetBitRate()

Result IRU_SetBitRate ( u8  value)

Sets the IR bit rate.

Parameters
valueBit rate to set.

◆ IRU_SetIRLEDState()

Result IRU_SetIRLEDState ( u32  value)

Sets the IR LED state.

Parameters
valueIR LED state to set.

◆ IRU_StartRecvTransfer()

Result IRU_StartRecvTransfer ( u32  size,
u8  flag 
)

Begins receiving data.

Parameters
sizeSize of the data to receive.
flagFlags to use when receiving.

◆ IRU_StartSendTransfer()

Result IRU_StartSendTransfer ( u8 buf,
u32  size 
)

Begins sending data.

Parameters
bufBuffer to send.
sizeSize of the buffer.

◆ IRU_WaitRecvTransfer()

Result IRU_WaitRecvTransfer ( u32 transfercount)

Waits for a receive operation to complete.

Parameters
transfercountPointer to output the number of bytes read to.

◆ iruGetServHandle()

Handle iruGetServHandle ( void  )

Gets the IRU service handle.

Returns
The IRU service handle.

◆ iruInit()

Result iruInit ( u32 sharedmem_addr,
u32  sharedmem_size 
)

Initializes IRU.

The permissions for the specified memory is set to RO. This memory must be already mapped.

Parameters
sharedmem_addrAddress of the shared memory block to use.
sharedmem_sizeSize of the shared memory block.

◆ iruRecvData()

Result iruRecvData ( u8 buf,
u32  size,
u8  flag,
u32 transfercount,
bool  wait 
)

Receives IR data.

Parameters
bufBuffer to receive data to.
sizeSize of the buffer.
flagFlags to receive data with.
transfercountPointer to output the number of bytes read to.
waitWhether to wait for the data to be received.

◆ iruSendData()

Result iruSendData ( u8 buf,
u32  size,
bool  wait 
)

Sends IR data.

Parameters
bufBuffer to send data from.
sizeSize of the buffer.
waitWhether to wait for the data to be sent.