File syn_cia303.c¶
FileList > proto > syn_cia303.c
Go to the source code of this file
CANopen CiA 303-3 Indicator & Status LED implementation.
#include "../util/syn_assert.h"#include "syn_cia303.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_cia303_init (SYN_CiA303_Indicator * ind, SYN_LED * run_led, SYN_LED * err_led) Initialize CiA 303-3 Indicator controller. |
| void | syn_cia303_set_error_state (SYN_CiA303_Indicator * ind, SYN_CiA303_ErrState err_state) Update Red ERROR LED state. |
| void | syn_cia303_set_nmt_state (SYN_CiA303_Indicator * ind, uint8_t nmt_state) Update RUN LED state according to CANopen NMT state. |
| void | syn_cia303_step (SYN_CiA303_Indicator * ind) Step indicator LEDs (call periodically or from main loop). |
Macros¶
| Type | Name |
|---|---|
| define | SYN_CANOPEN_NMT_OPERATIONAL 0x05U |
| define | SYN_CANOPEN_NMT_PRE_OPERATIONAL 0x7FU |
| define | SYN_CANOPEN_NMT_STOPPED 0x04U |
Public Functions Documentation¶
function syn_cia303_init¶
Initialize CiA 303-3 Indicator controller.
Parameters:
indIndicator instance.run_ledGreen RUN LED instance (initialized).err_ledRed ERROR LED instance (initialized).
function syn_cia303_set_error_state¶
Update Red ERROR LED state.
Parameters:
indIndicator instance.err_stateCiA 303-3 Error state enum.
function syn_cia303_set_nmt_state¶
Update RUN LED state according to CANopen NMT state.
Parameters:
indIndicator instance.nmt_stateCANopen NMT state byte (e.g. Pre-Op, Op, Stopped).
function syn_cia303_step¶
Step indicator LEDs (call periodically or from main loop).
Parameters:
indIndicator instance.
Macro Definition Documentation¶
define SYN_CANOPEN_NMT_OPERATIONAL¶
define SYN_CANOPEN_NMT_PRE_OPERATIONAL¶
define SYN_CANOPEN_NMT_STOPPED¶
The documentation for this class was generated from the following file src/syntropic/proto/syn_cia303.c