primitives for sending numbers over the serial link
More...
#include "sermsg.h"
#include "serial.h"
Functions |
void | serwrite_hex4 (uint8_t v) |
| write a single hex digit
|
void | serwrite_hex8 (uint8_t v) |
| write a pair of hex digits
|
void | serwrite_hex16 (uint16_t v) |
| write four hex digits
|
void | serwrite_hex32 (uint32_t v) |
| write eight hex digits
|
void | serwrite_uint32 (uint32_t v) |
| write decimal digits from a long unsigned int
|
void | serwrite_int32 (int32_t v) |
| write decimal digits from a long signed int
|
Variables |
const uint32_t | powers [] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000} |
| list of powers of ten, used for dividing down decimal numbers for sending, and also for our crude floating point algorithm
|
Detailed Description
primitives for sending numbers over the serial link
Function Documentation
void serwrite_hex16 |
( |
uint16_t |
v ) |
|
void serwrite_hex32 |
( |
uint32_t |
v ) |
|
write eight hex digits
- Parameters:
-
Referenced by sersendf_P().
void serwrite_hex4 |
( |
uint8_t |
v ) |
|
write a single hex digit
- Parameters:
-
v | hex digit to write, higher nibble ignored |
Referenced by serwrite_hex8().
void serwrite_hex8 |
( |
uint8_t |
v ) |
|
void serwrite_int32 |
( |
int32_t |
v ) |
|
void serwrite_uint32 |
( |
uint32_t |
v ) |
|