![]() |
NUC472_NUC442_BSP V3.03.005
The Board Support Package for NUC472/NUC442
|
Macros | |
#define | PS2_SET_TX_BYTE_CNT(u32Count) |
This function use to set TX FIFO length. More... | |
#define | PS2_GET_STATUS() |
This function use to get PS2 status. More... | |
#define | PS2_CLR_STATUS(u32Mask) (PS2D->PS2STATUS = u32Mask) |
This function use to clear PS2 status. More... | |
#define | PS2_CLR_RX_INT_FLAG() |
This function use to clear PS2 Rx interrupt. More... | |
#define | PS2_CLR_TX_INT_FLAG() |
This function use to clear PS2 Tx interrupt. More... | |
#define | PS2_GET_INT_FLAG(u32IntFlag) |
This function use to get PS2 interrupt. More... | |
#define | PS2_DISABLE_OVERRIDE() |
This function use to set PS2CLK and PS2DATA pins are controlled by hardware. More... | |
#define | PS2_ENABLE_OVERRIDE() |
This function use to set PS2CLK and PS2DATA pins are controlled by software. More... | |
#define | PS2_GET_TX_BYTE_INDEX() |
This function use to get indicates which data byte in transmit data shift register. More... | |
#define | PS2_SET_DATA_LOW() |
This function use to set PS2DATA Pin low. More... | |
#define | PS2_SET_DATA_HIGH() |
This function use to set PS2DATA Pin high. More... | |
#define | PS2_SET_CLK_LOW() |
This function use to set PS2CLK Pin low. More... | |
#define | PS2_SET_CLK_HIGH() |
This function use to set PS2CLK Pin high. More... | |
#define | PS2_DISABLE_ACK_ALWAYS() |
If Parity error or Stop bit is Not Received Correctly, Acknowledge will Not be Sent to host at 12th clock. More... | |
#define | PS2_ENABLE_ACK_ALWAYS() |
Always sends acknowledge to host at 12th clock for host to device communication. More... | |
Functions | |
__STATIC_INLINE void | PS2_CLEAR_TX_FIFO (void) |
This function use to clear PS2 Tx FIFO. More... | |
void | PS2_Open (void) |
This function use to enable PS2 function and set one byte per trnasfer. More... | |
void | PS2_Close (void) |
This function use to disable PS2 function. More... | |
uint8_t | PS2_Read (void) |
This function use to read PS2 Rx data. More... | |
int32_t | PS2_Write (uint32_t *pu32Buf, uint32_t u32ByteCount) |
This function use to transmit PS2 data. More... | |
void | PS2_EnableInt (uint32_t u32Mask) |
The function is used to enable PS2 specified interrupt. More... | |
void | PS2_DisableInt (uint32_t u32Mask) |
The function is used to disable PS2 specified interrupt. More... | |
#define PS2_CLR_RX_INT_FLAG | ( | ) |
#define PS2_CLR_STATUS | ( | u32Mask | ) | (PS2D->PS2STATUS = u32Mask) |
This function use to clear PS2 status.
[in] | u32Mask | Clear the specified status of Ps2 module: PS2_STATUS_FRAMEERR_Msk , PS2_STATUS_RXOV_Msk |
#define PS2_CLR_TX_INT_FLAG | ( | ) |
#define PS2_DISABLE_ACK_ALWAYS | ( | ) |
#define PS2_DISABLE_OVERRIDE | ( | ) |
#define PS2_ENABLE_ACK_ALWAYS | ( | ) |
#define PS2_ENABLE_OVERRIDE | ( | ) |
#define PS2_GET_INT_FLAG | ( | u32IntFlag | ) |
This function use to get PS2 interrupt.
[in] | u32IntFlag | interrupt flag: PS2_INTSTS_TXIF_Msk , PS2_INTSTS_RXIF_Msk |
#define PS2_GET_STATUS | ( | ) |
#define PS2_GET_TX_BYTE_INDEX | ( | ) |
#define PS2_SET_CLK_HIGH | ( | ) |
#define PS2_SET_CLK_LOW | ( | ) |
#define PS2_SET_DATA_HIGH | ( | ) |
#define PS2_SET_DATA_LOW | ( | ) |
#define PS2_SET_TX_BYTE_CNT | ( | u32Count | ) |
__STATIC_INLINE void PS2_CLEAR_TX_FIFO | ( | void | ) |
void PS2_Close | ( | void | ) |
void PS2_DisableInt | ( | uint32_t | u32Mask | ) |
The function is used to disable PS2 specified interrupt.
[in] | u32Mask | The specified interrupt of PS2 module:
|
void PS2_EnableInt | ( | uint32_t | u32Mask | ) |
The function is used to enable PS2 specified interrupt.
[in] | u32Mask | The specified interrupt of PS2 module:
|
void PS2_Open | ( | void | ) |
uint8_t PS2_Read | ( | void | ) |
int32_t PS2_Write | ( | uint32_t * | pu32Buf, |
uint32_t | u32ByteCount | ||
) |