Functions
JSX_Detect
u8 JSX_Detect(
enum INPUT_PORT port
)

Detect JSX device in the given port.

Parameters
port
enum INPUT_PORT

Input port to detect (INPUT_PORT1 or INPUT_PORT2).

Return

JSX device ID.

 7 6 5 4 3 2 1 0
–-–-–-–-–-–-–-–--
0 0 A A A A B B
│ │ │ │ └─┴── Number of button rows (0-3)
└─┴─┴─┴────── Number of axis (0-15)
JSX_Read
u8 JSX_Read(
enum INPUT_PORT port,
u8* buffer
)

Read JSX device in the given port.

Parameters
port
enum INPUT_PORT

Input port to read (INPUT_PORT1 or INPUT_PORT2).

buffer
u8*

Buffer to store the input data.

Return

JSX device ID.

JSX_GetAxisNumber
inline u8 JSX_GetAxisNumber(
u8 id
)

Get the number of axis from the given JSX device ID.

Parameters
id
u8

JSX device ID.

Return

Number of axis.

JSX_GetRowsNumber
inline u8 JSX_GetRowsNumber(
u8 id
)

Get the number of button rows from the given JSX device ID.

Parameters
id
u8

JSX device ID.

Return

Number of button rows.

JSX_GetButtonsNumber
inline u8 JSX_GetButtonsNumber(
u8 id
)

Get the number of buttons from the given JSX device ID.

Parameters
id
u8

JSX device ID.

Return

Number of buttons.

JSXC_Detect
u8 JSXC_Detect(
enum INPUT_PORT port
)

Detect JSX device in the given port.

Parameters
port
enum INPUT_PORT

Input port to detect (INPUT_PORT1 or INPUT_PORT2).

Return

JSX device ID.

 7 6 5 4 3 2 1 0
–-–-–-–-–-–-–-–--
0 0 A A A A B B
│ │ │ │ └─┴── Number of button rows (0-3)
└─┴─┴─┴────── Number of axis (0-15)
JSXC_Read
u8 JSXC_Read(
enum INPUT_PORT port,
u8* buffer
)

Read JSX device in the given port.

Parameters
port
enum INPUT_PORT

Input port to read (INPUT_PORT1 or INPUT_PORT2).

buffer
u8*

Buffer to store the input data.

Return

JSX device ID.