Version 2.0.0-0

ps2 Reference

File
core/xeos/include/xeos/hal/ps2.h
Date
Wednesday, June 25, 2014
Includes
  • <stdint.h>
  • <stdbool.h>

Tasks

XEOS_HAL_PS2_GetStatus Top

Reads the PS2 status register

uint8_t XEOS_HAL_PS2_GetStatus( void );

Return value

The content of the PS2 status register

XEOS_HAL_PS2_InputBufferEmpty Top

Checks if the PS2 input buffer is empty

bool XEOS_HAL_PS2_InputBufferEmpty( void );

Return value

True if the input buffer is empty, otherwise false

XEOS_HAL_PS2_OutputBufferEmpty Top

Checks if the PS2 output buffer is empty

bool XEOS_HAL_PS2_OutputBufferEmpty( void );

Return value

True if the output buffer is empty, otherwise false

XEOS_HAL_PS2_ParityError Top

Checks for a PS2 parity error

bool XEOS_HAL_PS2_ParityError( void );

Return value

True for a PS2 parity error, otherwise false

XEOS_HAL_PS2_ReadData Top

Always check that the output buffer is full before reading data.

uint8_t XEOS_HAL_PS2_ReadData( void );

Return value

The content of the PS2 data register

XEOS_HAL_PS2_SendCommand Top

Writes a commands to the PS2 controller

void XEOS_HAL_PS2_SendCommand( uint8_t command );

Parameters
  • command
    The command to send

XEOS_HAL_PS2_TimeoutError Top

Checks for a PS2 timeout error

bool XEOS_HAL_PS2_TimeoutError( void );

Return value

True for a PS2 timeout error, otherwise false

XEOS_HAL_PS2_WriteData Top

Always check that the input buffer is empty before writing data.

void XEOS_HAL_PS2_WriteData( uint8_t data );

Parameters
  • data
    The data to write

Macros

__XEOS_HAL_PS2_H__ Top

#define __XEOS_HAL_PS2_H__