HRI board firmware v2.1 Microcontroller firmware of the board used during the HRI labs.

Data Structures | Macros | Functions
communication.h File Reference
`#include "main.h"`
`#include "definitions.h"`
`#include <stdarg.h>`

Go to the source code of this file.

## Data Structures
struct | comm_SyncVar

## Macros
#define | comm_SendDebugMessageDecimated(decimation, format, ...)
| Sends a debug message to the computer, with decimation. This macro is useful to print human-readable text, in a fast loop, to avoid overloading the communication bus, or the computer. More...

## Functions
void | comm_Init (void)
| Init the communication manager. More...
void | comm_Step (void)
| Updates the communication manager. Send the bytes waiting in the TX buffer, and process the bytes received. More...
void | comm_NotifyReady (void)
| Sends a packet to notify the PC that the board just (re)started. This informs the PC software that the board is ready, and that the variables list can be retrieved. More...
void | comm_monitorVar (const char name[], void *address, comm_VarType type, uint8_t size, comm_VarAccess access)
| Adds a monitored variable to the list, with its address. More...
void | comm_monitorVarFunc (const char name[], comm_VarType type, uint8_t size, void(*getFunc)(void), void(*setFunc)(void))
| Adds a monitored variable to the list, with getter/setter functions. If the getter and setter are set to an actual function address (not NULL), the variable will be READWRITE. If the getter is NULL but setter is not NULL, the variable will be WRITEONLY. If the getter is not NULL the setter is NULL, the variable will be READONLY. If the getter and setter are both NULL, the variable will not be added to the variables list. More...
void | comm_monitorBool (const char name[], bool *address, comm_VarAccess access)
| Adds a monitored bool variable to the list, with its address. More...
void | comm_monitorUint8 (const char name[], uint8_t *address, comm_VarAccess access)
| Adds a monitored uint8_t variable to the list, with its address. More...
void | comm_monitorInt8 (const char name[], int8_t *address, comm_VarAccess access)
| Adds a monitored int8_t variable to the list, with its address. More...
void | comm_monitorUint16 (const char name[], uint16_t *address, comm_VarAccess access)
| Adds a monitored uint16_t variable to the list, with its address. More...
void | comm_monitorInt16 (const char name[], int16_t *address, comm_VarAccess access)
| Adds a monitored int16_t variable to the list, with its address. More...
void | comm_monitorUint32 (const char name[], uint32_t *address, comm_VarAccess access)
| Adds a monitored uint32_t variable to the list, with its address. More...
void | comm_monitorInt32 (const char name[], int32_t *address, comm_VarAccess access)
| Adds a monitored int32_t variable to the list, with its address. More...
void | comm_monitorUint64 (const char name[], uint64_t *address, comm_VarAccess access)
| Adds a monitored uint64_t variable to the list, with its address. More...
void | comm_monitorInt64 (const char name[], int64_t *address, comm_VarAccess access)
| Adds a monitored int64_t variable to the list, with its address. More...
void | comm_monitorFloat (const char name[], float *address, comm_VarAccess access)
| Adds a monitored float variable to the list, with its address. More...
void | comm_monitorDouble (const char name[], double *address, comm_VarAccess access)
| Adds a monitored double variable to the list, with its address. More...
void | comm_monitorBoolFunc (const char name[], bool(*getFunc)(void), void(*setFunc)(bool))
| Adds a monitored bool variable to the list, with getter/setter. More...
void | comm_monitorUint8Func (const char name[], uint8_t(*getFunc)(void), void(*setFunc)(uint8_t))
| Adds a monitored uint8_t variable to the list, with getter/setter. More...
void | comm_monitorInt8Func (const char name[], int8_t(*getFunc)(void), void(*setFunc)(int8_t))
| Adds a monitored int8_t variable to the list, with getter/setter. More...
void | comm_monitorUint16Func (const char name[], uint16_t(*getFunc)(void), void(*setFunc)(uint16_t))
| Adds a monitored uint16_t variable to the list, with getter/setter. More...
void | comm_monitorInt16Func (const char name[], int16_t(*getFunc)(void), void(*setFunc)(int16_t))
| Adds a monitored int16_t variable to the list, with getter/setter. More...
void | comm_monitorUint32Func (const char name[], uint32_t(*getFunc)(void), void(*setFunc)(uint32_t))
| Adds a monitored uint32_t variable to the list, with getter/setter. More...
void | comm_monitorInt32Func (const char name[], int32_t(*getFunc)(void), void(*setFunc)(int32_t))
| Adds a monitored int32_t variable to the list, with getter/setter. More...
void | comm_monitorUint64Func (const char name[], uint64_t(*getFunc)(void), void(*setFunc)(uint64_t))
| Adds a monitored uint64_t variable to the list, with getter/setter. More...
void | comm_monitorInt64Func (const char name[], int64_t(*getFunc)(void), void(*setFunc)(int64_t))
| Adds a monitored int64_t variable to the list, with getter/setter. More...
void | comm_monitorFloatFunc (const char name[], float(*getFunc)(void), void(*setFunc)(float))
| Adds a monitored float variable to the list, with getter/setter. More...
void | comm_monitorDoubleFunc (const char name[], double(*getFunc)(void), void(*setFunc)(double))
| Adds a monitored double variable to the list, with getter/setter. More...
void | comm_LockSyncVarsList (void)
| Locks the monitored variables, so it can be used. After the call to this function, adding variables will not be possible anymore. The PC will not be able to get the variables list until this function is called. More...
void | comm_SendDebugMessage (const char *format,...)
| Sends a debug message to the computer. More...