data buffer ( Use comm_int function call ). Before exiting
program, user must free this buffer ( Use comm_exit function
call ).
unsigned char port Specifies communication port (COM1 or COM2)
1: COM1 port
2: COM2 port
Return:
Returns a 1 if command succeeds. Returns a 0 if it fails.
comm_get_rec_str
Syntax:
int comm_get_rec_str(unsigned char **data, unsigned char port)
Function Description:
This function call is employed to received string data. The function call returns a success flag if
the communication port receives string data ( terminal character is 0x0d) . The function call
returns a fail flag if the buffer of the communication port is empty.
Parameter Description
unsigned char **data Returns the received string contents. User must first allocate a
data buffer (Use comm_int function call). Before exiting
program, user must free this buffer (Use comm_exit function
call).
unsigned char port Specifies communication port (COM1 or COM2)
1: COM1 port
2: COM2 port
Return:
Returns a 1 if command succeeds. Returns a 0 if it fails.
led_init
Syntax:
void led_init()
Function Description:
This function must be called to initialize the ADAM-4500's LED before a user's program can
control the LED.
led
Syntax:
void led(int type)