Microchip® Advanced Software Framework

controller.h File Reference
#include "compiler.h"

Functions

Initialization
void controller_init (uint32_t fcpu_hz, uint32_t fhsb_hz, uint32_t fpbb_hz, uint32_t fpba_hz)
 Initialization function of the controller interface. More...
 
is_joystick_up
bool is_joystick_up (void)
 check if up is pressed. More...
 
is_joystick_down
bool is_joystick_down (void)
 check if down is pressed. More...
 
is_joystick_right
bool is_joystick_right (void)
 check if right is pressed. More...
 
is_joystick_left
bool is_joystick_left (void)
 check if left is pressed. More...
 
is_joystick_pressed
bool is_joystick_pressed (void)
 check if pressed is pressed. More...
 
update_joystick_status
void update_joystick_status (unsigned short new_status)
 Update the internal controller status and test a specific event. More...
 

void controller_init ( uint32_t  fcpu_hz,
uint32_t  fhsb_hz,
uint32_t  fpbb_hz,
uint32_t  fpba_hz 
)

Initialization function of the controller interface.

Parameters
fcpu_hzCPU frequency.
fhsb_hzHSB frequency.
fpbb_hzPBB frequency.
fpba_hzPBA frequency.

Referenced by main().

bool is_joystick_down ( void  )

check if down is pressed.

References is_touch_sensor_1().

Referenced by is_usb_hid_event().

bool is_joystick_left ( void  )

check if left is pressed.

References is_touch_sensor_3().

Referenced by is_usb_hid_event().

bool is_joystick_pressed ( void  )

check if pressed is pressed.

References is_touch_sensor_4().

Referenced by device_audio_task(), and is_usb_hid_event().

bool is_joystick_right ( void  )

check if right is pressed.

References is_touch_sensor_2().

Referenced by is_usb_hid_event().

bool is_joystick_up ( void  )

check if up is pressed.

References is_touch_sensor_0().

Referenced by is_usb_hid_event().

void update_joystick_status ( unsigned short  new_status)

Update the internal controller status and test a specific event.