CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
CO_LEDs.h
Go to the documentation of this file.
1
21#ifndef CO_LEDS_H
22#define CO_LEDS_H
23
24#include "301/CO_driver.h"
26
27/* default configuration, see CO_config.h */
28#ifndef CO_CONFIG_LEDS
29#define CO_CONFIG_LEDS (CO_CONFIG_LEDS_ENABLE | CO_CONFIG_GLOBAL_FLAG_TIMERNEXT)
30#endif
31
32#if (((CO_CONFIG_LEDS)&CO_CONFIG_LEDS_ENABLE) != 0) || defined CO_DOXYGEN
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
73#define CO_LED_flicker 0x01U
74#define CO_LED_blink 0x02U
75#define CO_LED_flash_1 0x04U
76#define CO_LED_flash_2 0x08U
77#define CO_LED_flash_3 0x10U
78#define CO_LED_flash_4 0x20U
79#define CO_LED_CANopen 0x80U
83#define CO_LED_RED(LEDs, BITMASK) ((((LEDs)->LEDred & BITMASK) != 0U) ? 1U : 0U)
85#define CO_LED_GREEN(LEDs, BITMASK) ((((LEDs)->LEDgreen & BITMASK) != 0U) ? 1U : 0U)
86
100
111
130void CO_LEDs_process(CO_LEDs_t* LEDs, uint32_t timeDifference_us, CO_NMT_internalState_t NMTstate, bool_t LSSconfig,
131 bool_t ErrCANbusOff, bool_t ErrCANbusWarn, bool_t ErrRpdo, bool_t ErrSync, bool_t ErrHbCons,
132 bool_t ErrOther, bool_t firmwareDownload, uint32_t* timerNext_us);
133
134 /* CO_LEDs */
135
136#ifdef __cplusplus
137}
138#endif /* __cplusplus */
139
140#endif /* (CO_CONFIG_LEDS) & CO_CONFIG_LEDS_ENABLE */
141
142#endif /* CO_LEDS_H */
CANopen Network management and Heartbeat producer protocol.
Interface between CAN hardware and CANopenNode.
void CO_LEDs_process(CO_LEDs_t *LEDs, uint32_t timeDifference_us, CO_NMT_internalState_t NMTstate, bool_t LSSconfig, bool_t ErrCANbusOff, bool_t ErrCANbusWarn, bool_t ErrRpdo, bool_t ErrSync, bool_t ErrHbCons, bool_t ErrOther, bool_t firmwareDownload, uint32_t *timerNext_us)
Process indicator states.
CO_ReturnError_t CO_LEDs_init(CO_LEDs_t *LEDs)
Initialize LEDs object.
CO_NMT_internalState_t
Internal network state of the CANopen node.
Definition CO_NMT_Heartbeat.h:70
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition CO_driver.h:133
uint_fast8_t bool_t
Boolean data type for general use.
Definition CO_driver.h:126
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131
CO_ReturnError_t
Return values of some CANopen functions.
Definition CO_driver.h:449
LEDs object, initialized by CO_LEDs_init()
Definition CO_LEDs.h:90
uint8_t LEDtmrflash_1
single flash led timer
Definition CO_LEDs.h:93
uint8_t LEDtmr200ms
200ms led timer
Definition CO_LEDs.h:92
uint8_t LEDgreen
green led bitfield, to be combined with CO_LED bitmasks
Definition CO_LEDs.h:98
uint8_t LEDtmrflash_3
triple flash led timer
Definition CO_LEDs.h:95
uint8_t LEDred
red led bitfield, to be combined with CO_LED bitmasks
Definition CO_LEDs.h:97
uint32_t LEDtmr50ms
50ms led timer
Definition CO_LEDs.h:91
uint8_t LEDtmrflash_4
quadruple flash led timer
Definition CO_LEDs.h:96
uint8_t LEDtmrflash_2
double flash led timer
Definition CO_LEDs.h:94