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...
Result | IRU_GetSendFinishedEvent (Handle *out)
| Gets an event which is signaled once a send finishes. More...
Result | IRU_GetRecvFinishedEvent (Handle *out)
| Gets an event which is signaled once a receive finishes. More...

## Detailed Description

IR service.

## Function Documentation

## IRU_GetBitRate()

Result IRU_GetBitRate | ( | u8 * | out | ) |

Gets the IR bit rate.

Parameters

  out | Pointer to write the bit rate to.

## IRU_GetIRLEDRecvState()

Result IRU_GetIRLEDRecvState | ( | u32 * | out | ) |

Gets the IR LED state.

Parameters

  out | Pointer to write the IR LED state to.

## IRU_GetRecvFinishedEvent()

Result IRU_GetRecvFinishedEvent | ( | Handle * | out | ) |

Gets an event which is signaled once a receive finishes.

Parameters

  out | Pointer to write the event handle to.

## IRU_GetSendFinishedEvent()

Result IRU_GetSendFinishedEvent | ( | Handle * | out | ) |

Gets an event which is signaled once a send finishes.

Parameters

  out | Pointer to write the event handle to.

## IRU_SetBitRate()

Result IRU_SetBitRate | ( | u8 | value | ) |

Sets the IR bit rate.

Parameters

  value | Bit rate to set.

## IRU_SetIRLEDState()

Result IRU_SetIRLEDState | ( | u32 | value | ) |

Sets the IR LED state.

Parameters

  value | IR LED state to set.

## IRU_StartRecvTransfer()

Result IRU_StartRecvTransfer | ( | u32 | size,
|  | u8 | flag
| ) |  |

Begins receiving data.

Parameters

  size | Size of the data to receive.
  flag | Flags to use when receiving.

## IRU_StartSendTransfer()

Result IRU_StartSendTransfer | ( | u8 * | buf,
|  | u32 | size
| ) |  |

Begins sending data.

Parameters

  buf | Buffer to send.
  size | Size of the buffer.

## IRU_WaitRecvTransfer()

Result IRU_WaitRecvTransfer | ( | u32 * | transfercount | ) |

Waits for a receive operation to complete.

Parameters

  transfercount | Pointer 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_addr | Address of the shared memory block to use.
  sharedmem_size | Size of the shared memory block.

## iruRecvData()

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

Receives IR data.

Parameters

  buf | Buffer to receive data to.
  size | Size of the buffer.
  flag | Flags to receive data with.
  transfercount | Pointer to output the number of bytes read to.
  wait | Whether to wait for the data to be received.

## iruSendData()

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

Sends IR data.

Parameters

  buf | Buffer to send data from.
  size | Size of the buffer.
  wait | Whether to wait for the data to be sent.