armapi  v1.0
bĂȘta
Port

Typedefs

typedef enum armPortPin_e armPortPin_t
 Constant to define the pins. More...
 

Enumerations

enum  armPortBaudrate_t {
  ARMPORT_BAUDRATE_NONE = 0, ARMPORT_BAUDRATE_1200 = 1200, ARMPORT_BAUDRATE_2400 = 2400, ARMPORT_BAUDRATE_4800 = 4800,
  ARMPORT_BAUDRATE_9600 = 9600, ARMPORT_BAUDRATE_19200 = 19200, ARMPORT_BAUDRATE_38400 = 38400, ARMPORT_BAUDRATE_57600 = 57600,
  ARMPORT_BAUDRATE_115200 = 115200, ARMPORT_BAUDRATE_230400 = 230400
}
 Constant to define the baudrate value. More...
 
enum  armPortDatabits_t { ARMPORT_DATA_7BITS = 7, ARMPORT_DATA_8BITS = 8 }
 Constant to define the data bits value. More...
 
enum  armPortParity_t { ARMPORT_PARITY_NO, ARMPORT_PARITY_ODD, ARMPORT_PARITY_EVEN }
 Constant to define the parity type. More...
 
enum  armPortStopbit_t { ARMPORT_STOPBIT_1 = 1, ARMPORT_STOPBIT_2 = 2 }
 Constant to define the number stop bits. More...
 
enum  armPortPin_e { ARMPORT_PIN_nSLEEP, ARMPORT_PIN_nBOOT, ARMPORT_PIN_nRESET }
 Constant to define the pins. More...
 

Functions

int armPortOpen (void **port)
 
int armPortConfig (void *port, armPortBaudrate_t baudrate, armPortDatabits_t databits, armPortParity_t parity, armPortStopbit_t stopbit)
 
int armPortWrite (void *port, const void *buf, size_t nbyte)
 
int armPortRead (void *port, void *buf, size_t nbyte, unsigned int timeout)
 
void armPortDelay (unsigned int ms)
 
void armPortGpioSet (void *port, armPortPin_t pin, bool val)
 

Detailed Description

All function in this group except armPortGpioSet() must be implemented on you platform to use armapi.

Typedef Documentation

typedef enum armPortPin_e armPortPin_t

Constant to define the pins.

Enumeration Type Documentation

Constant to define the baudrate value.

Enumerator
ARMPORT_BAUDRATE_NONE 

That is probably a error.

ARMPORT_BAUDRATE_1200 

1200 bps.

ARMPORT_BAUDRATE_2400 

2400 bps.

ARMPORT_BAUDRATE_4800 

4800 bps.

ARMPORT_BAUDRATE_9600 

9600 bps.

ARMPORT_BAUDRATE_19200 

19200 bps.

ARMPORT_BAUDRATE_38400 

38400 bps.

ARMPORT_BAUDRATE_57600 

57600 bps.

ARMPORT_BAUDRATE_115200 

115200 bps.

ARMPORT_BAUDRATE_230400 

230400 bps.

Constant to define the data bits value.

Enumerator
ARMPORT_DATA_7BITS 

data of 7 bits.

ARMPORT_DATA_8BITS 

data of 8 bits.

Constant to define the parity type.

Enumerator
ARMPORT_PARITY_NO 

No parity.

ARMPORT_PARITY_ODD 

ODD parity.

ARMPORT_PARITY_EVEN 

Even parity.

Constant to define the pins.

Enumerator
ARMPORT_PIN_nSLEEP 

nSLEEP pin.

ARMPORT_PIN_nBOOT 

nBOOT pin

ARMPORT_PIN_nRESET 

nRESET pin.

Constant to define the number stop bits.

Enumerator
ARMPORT_STOPBIT_1 

1 stop bit.

ARMPORT_STOPBIT_2 

2 stop bit.

Function Documentation

int armPortConfig ( void *  port,
armPortBaudrate_t  baudrate,
armPortDatabits_t  databits,
armPortParity_t  parity,
armPortStopbit_t  stopbit 
)
void armPortDelay ( unsigned int  ms)
void armPortGpioSet ( void *  port,
armPortPin_t  pin,
bool  val 
)
int armPortOpen ( void **  port)
int armPortRead ( void *  port,
void *  buf,
size_t  nbyte,
unsigned int  timeout 
)
int armPortWrite ( void *  port,
const void *  buf,
size_t  nbyte 
)