BPS Uart driver (.
More...
#include "stdbool.h"
#include "cfg_board.h"
#include "errorcode.h"
#include "drv/wb/suart.h"
Go to the source code of this file.
|
#define | E_BPS_TIMEOUT E_BPS + 1 |
| Receive timeout.
|
|
#define | E_BPS_TIMEOUT_DESCR "BPS Response Timeout" |
|
#define | E_BPS_CHKERR E_BPS + 2 |
| bad checksum received
|
|
#define | E_BPS_CHKERR_DESCR "BPS Bad checksum" |
|
#define | E_BPS_NOEOF E_BPS + 3 |
| no EOF received when expected
|
|
#define | E_BPS_NOEOF_DESCR "BPS No EOF received" |
|
#define | E_BPS_RETADDR E_BPS + 4 |
|
#define | E_BPS_RETADDR_DESCR "BPS Response Bad Addr" |
|
#define | E_BPS_RETCHK E_BPS + 5 |
|
#define | E_BPS_RETCHK_DESCR "BPS Response Bad Checksum" |
|
#define | E_BPS_RETSTA E_BPS + 6 |
|
#define | E_BPS_RETSTA_DESCR "BPS Response Bad Start" |
|
#define | E_BPS_RETTIM E_BPS + 7 |
|
#define | E_BPS_RETTIM_DESCR "BPS Response Tx Was Timeouted" |
|
#define | E_BPS_RETUNK E_BPS + 8 |
|
#define | E_BPS_RETUNK_DESCR "BPS Response Unknown" |
|
#define | E_BPS_NOSOF E_BPS + 9 |
| no EOF received when expected
|
|
#define | E_BPS_NOSOF_DESCR "BPS No SOF received" |
|
#define | BPS_BAUDRATE_DEFAULT SUART_BAUDRATE_19200 |
| Default Baudrate.
|
|
BPS Uart driver (.
Definition in file bps.h.
bool bpsAlarmClearStat |
( |
uint16_t * |
alarms | ) |
|
Clear Status Alarm.
- Parameters
-
alarms | = pointer to returned alarm status |
Definition at line 654 of file bps.c.
bool bpsAlarmEnLoad |
( |
uint16_t * |
alarms | ) |
|
Load already saved alarm enable.
- Parameters
-
alarms | = pointer to returned loaded value of alarm enable |
Definition at line 614 of file bps.c.
bool bpsAlarmEnSave |
( |
uint16_t |
newal, |
|
|
uint16_t * |
alarms |
|
) |
| |
save alarm enable
- Parameters
-
newal | = enable alarm value to be saved alarms = pointer to returned saved value of alarm enable |
Definition at line 630 of file bps.c.
bool bpsAlarmThLoad |
( |
BspTh * |
th | ) |
|
load already saved alarm threshold (in mA)
- Parameters
-
th | = pointer to returned saved value of alarm threshold |
Definition at line 671 of file bps.c.
save alarm threshold (in mA)
- Parameters
-
newal | = threshold alarm value to be saved th = pointer to returned saved value of alarm threshold |
Definition at line 698 of file bps.c.
bool bpsDbgCmdReply |
( |
uint8_t |
cmdCode, |
|
|
uint8_t * |
cmdPData, |
|
|
uint8_t |
cmdNData, |
|
|
uint8_t |
rplCode, |
|
|
uint8_t ** |
rplPData, |
|
|
uint8_t |
rplNData |
|
) |
| |
Exposes the low-level interface to the BPS.
- Note
- The usage of this function is discouraged.
- Parameters
-
cmdCode | The command code |
cmdPData | Pointer to the command data |
cmdNData | Length of the data |
rplCode | Expected reply code |
rplPData | Pointer-Pointer which will point to the reply data buffer |
rplNData | Expected length of the reply data. |
- Return values
-
true | Success |
false | Failure, check error module for error |
Definition at line 788 of file bps.c.
Initializes the BPS.
- Parameters
-
Definition at line 87 of file bps.h.
bool bpsPingDevice |
( |
uint16_t * |
fw | ) |
|
Ping Device.
- Parameters
-
fw | = pointer to returned firmware release |
Definition at line 770 of file bps.c.
return sensor values
- Parameters
-
stat | = pointer to Status structure |
Definition at line 577 of file bps.c.
bool bpsRelayToggleBackBone |
( |
uint16_t * |
breakers | ) |
|
Toggle relay status.
- Parameters
-
breakers | = pointer to returned breakers value |
Definition at line 737 of file bps.c.