CircleOS  1
Functions
cx.c File Reference

Generic functions for the extension connector. More...

Go to the source code of this file.

Functions

s32 CX_Configure (tCX_ID what, s32 param1, s32 param2)
 Initialization of the GPIOs and peripheral available on the extension board. More...
 
s32 CX_Write (tCX_ID what, s32 param1, s32 param2)
 Handle outputs onto the extension connector. More...
 
s32 CX_Read (tCX_ID what, s32 param1, s32 param2)
 Handle outputs onto the extension connector. More...
 

Detailed Description

Author
FL
Date
11/2012
Note
Added to encapsulate generically the access to the extension connector (CX)

Definition in file cx.c.

Function Documentation

s32 CX_Configure ( tCX_ID  what,
s32  param1,
s32  param2 
)
Parameters
[in]whatthe pin reference or the peripheral.
[in]param1GPIO : configuration mode of the pin (in / out / pull up...) ADC : none, USART : configuration structure, SPI : configuration structure.
[in]param2not used, reserved for future use.
Returns
0 if no error
Note
Is NOT called by CircleOS startup.

Definition at line 47 of file cx.c.

s32 CX_Read ( tCX_ID  what,
s32  param1,
s32  param2 
)
Parameters
[in]whatthe pin reference or the peripheral.
[in]param1GPIO : state of the input or output (CX_GPIO_LOW or CX_GPIO_HIGH), ADC : analog value, USART : configuration structure, SPI : configuration structure.
[in]param2not used, reserved for future use.
Returns
0 if no error

Definition at line 139 of file cx.c.

s32 CX_Write ( tCX_ID  what,
s32  param1,
s32  param2 
)
Parameters
[in]whatthe pin reference or the peripheral.
[in]param1GPIO : output state to write (CX_GPIO_LOW or CX_GPIO_HIGH), ADC : not applicable, USART : address of buffer to send, if NULL, param2 = address of byte number staying to send. SPI : address of buffer to send, if NULL, param2 = address of byte number staying to send.
[in]param2address of byte number to send, or byte number staying to send.
Returns
0 if no error

Definition at line 107 of file cx.c.