dRonin
adbada4
dRonin firmware
|
Files | |
file | storm32bgc.c |
Forward a set of UAVObjects when updated out a PIOS_COM port. | |
Macros | |
#define | STACK_SIZE_BYTES 512 |
#define | TASK_PRIORITY PIOS_THREAD_PRIO_LOW |
#define | STORM32BGC_PERIOD_MS 20 |
#define | STORM32BGC_QUEUE_SIZE 64 |
#define | X25_INIT_CRC 0xFFFF |
Functions | |
static void | storm32bgcTask (void *parameters) |
static uint16_t | crc_calculate (uint8_t *pBuffer, int length) |
Calculates the X.25 checksum on a byte buffer. More... | |
static uint8_t | cmd_set_angle (float pitch, float roll, float yaw, uint8_t flags, uint8_t type) |
int32_t | Storm32BgcInitialize (void) |
int32_t | Storm32BgcStart (void) |
MODULE_INITCALL (Storm32BgcInitialize, Storm32BgcStart) | |
static void | crc_accumulate (uint8_t data, uint16_t *crcAccum) |
Accumulate the X.25 CRC by adding one char at a time. More... | |
Variables | |
static struct pios_thread * | storm32bgcTaskHandle |
static bool | module_enabled |
struct pios_queue * | storm32bgc_queue |
static struct pios_recursive_mutex * | mutex |
static uintptr_t | storm32bgc_com_id |
union { | |
uint16_t value | |
uint8_t bytes [2] | |
} | crc |
union { | |
uint16_t value | |
uint8_t bytes [2] | |
} | dataU16 |
union { | |
float value | |
uint8_t bytes [4] | |
} | dataFloat |
#define STACK_SIZE_BYTES 512 |
Definition at line 44 of file storm32bgc.c.
#define STORM32BGC_PERIOD_MS 20 |
Definition at line 47 of file storm32bgc.c.
#define STORM32BGC_QUEUE_SIZE 64 |
Definition at line 48 of file storm32bgc.c.
#define TASK_PRIORITY PIOS_THREAD_PRIO_LOW |
Definition at line 45 of file storm32bgc.c.
#define X25_INIT_CRC 0xFFFF |
CALCULATE THE CHECKSUM
Definition at line 175 of file storm32bgc.c.
|
static |
Send the Set Angle Command
Definition at line 237 of file storm32bgc.c.
|
inlinestatic |
Accumulate the X.25 CRC by adding one char at a time.
The checksum function adds the hash of one char at a time to the 16 bit checksum (uint16_t).
data | new char to hash |
crcAccum | the already accumulated checksum |
Definition at line 186 of file storm32bgc.c.
|
inlinestatic |
Calculates the X.25 checksum on a byte buffer.
pBuffer | buffer containing the byte array to hash |
length | length of the byte array |
Definition at line 203 of file storm32bgc.c.
MODULE_INITCALL | ( | Storm32BgcInitialize | , |
Storm32BgcStart | |||
) |
int32_t Storm32BgcInitialize | ( | void | ) |
Initialise the Storm32Bgc module
Definition at line 73 of file storm32bgc.c.
int32_t Storm32BgcStart | ( | void | ) |
Start the Storm32Bgc module
Definition at line 93 of file storm32bgc.c.
|
static |
Definition at line 122 of file storm32bgc.c.
uint8_t { ... } bytes[2] |
Definition at line 156 of file storm32bgc.c.
uint8_t { ... } bytes[2] |
Definition at line 161 of file storm32bgc.c.
uint8_t { ... } bytes[4] |
Definition at line 166 of file storm32bgc.c.
union { ... } crc |
union { ... } dataFloat |
union { ... } dataU16 |
|
static |
Definition at line 54 of file storm32bgc.c.
|
static |
Definition at line 56 of file storm32bgc.c.
|
static |
Definition at line 66 of file storm32bgc.c.
struct pios_queue* storm32bgc_queue |
Definition at line 55 of file storm32bgc.c.
|
static |
Definition at line 53 of file storm32bgc.c.
uint16_t { ... } value |
Definition at line 155 of file storm32bgc.c.
uint16_t { ... } value |
Definition at line 160 of file storm32bgc.c.
float { ... } value |
Definition at line 165 of file storm32bgc.c.