![]() |
NHS31xx SW API
|
The application can adapt the Storage module to better fit the different application scenarios through the use of diversity flags in the form of defines below. Sensible defaults are chosen; to override the default settings, place the defines with their desired values in the application app_sel.h header file: the compiler will pick up your defines before parsing this file.
These flags may be overridden:
These defines are derived from UARTTX_ENABLE_SHORTHANDS and may not be redefined in an application:
Macros | |
#define | UARTTX_STOPBITS 2 |
#define | UARTTX_BITRATE 9600 |
#define | UARTTX_INVERTED 0 |
#define | UARTTX_DEC_END_CHAR '\n' |
#define | UARTTX_HEX_END_CHAR '\n' |
#define | UARTTX_ENABLE_SHORTHANDS 0 |
#define | PRINTD(n) do {} while(0) |
#define | PRINTH(n) do {} while(0) |
#define | PRINTS(s) do {} while(0) |
#define | PRINTF(...) do {} while(0) |
#define UARTTX_STOPBITS 2 |
By default, the uart module will use two stop bits. Explicitly define UARTTX_STOPBITS
to 1
to end each byte with only 1 stopbit.
1
, 2
stop bits will be used. #define UARTTX_BITRATE 9600 |
The uart module will use 9600
as default bit rate, assuming the default system clock of 500 kHz. Explicitly define UARTTX_BITRATE
to switch to a higher bit rate.
#define UARTTX_INVERTED 0 |
In UART, the idle state is high. This means that a pull-up will be set to PIO9. This allows for energy injection into the IO ring, which can cause problems when trying to go to Power-off. If defined to a non-zero value, the idle state will be low and all bits will be transmitted inverted.
#define UARTTX_DEC_END_CHAR '\n' |
Defines the extra character to output after printing out a decimal or hexadecimal number using PRINTD.
#define UARTTX_HEX_END_CHAR '\n' |
Defines the extra character to output after printing out a decimal or hexadecimal number using PRINTH.
#define UARTTX_ENABLE_SHORTHANDS 0 |
Defines shorthands for quick debugging, using the uart to output strings. A typical usage for this diversity setting could be to have these enabled in a debug build, but have them disabled in a release build, still allowing the full functionality of the uart module for non-debug usages - using the full API function names.
#define PRINTD | ( | n | ) | do {} while(0) |
void
#define PRINTH | ( | n | ) | do {} while(0) |
void
#define PRINTS | ( | s | ) | do {} while(0) |
void
#define PRINTF | ( | ... | ) | do {} while(0) |
void