armapi
v1.0
bĂȘta
|
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "armconfig.h"
Go to the source code of this file.
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 | armPortClose (void *port) |
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) |
int armPortClose | ( | void * | port | ) |