Files
bacnet_stack/ports/xplained/led.h
T
Kari Argillander 369da70f2a Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces

We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.

Commit was generated with:

    pre-commit run --all-files trailing-whitespace

* format: Files should have exactly one new line end of them

It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.

Commit was generated with:

    pre-commit run --all-files end-of-file-fixer

* format: Convert tabs to spaces

Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.

Commit was generated with:

    pre-commit run --all-files remove-tabs

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2024-08-25 14:13:57 -05:00

61 lines
1.1 KiB
C

/**
* @file
* @brief LED configuration and operation
* @author Steve Karg <skarg@users.sourceforge.net>
* @date 2014
* @copyright SPDX-License-Identifier: MIT
*/
#ifndef LED_H
#define LED_H
#include <stdint.h>
#include <stdbool.h>
#define LED_RS485_RX 0
#define LED_RS485_TX 1
#define LED_APDU 2
#define LED_DEBUG 3
#define LEDS_MAX 4
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef CONF_BOARD_ENABLE_RS485_XPLAINED
void led_on(
uint8_t index);
void led_on_interval(
uint8_t index,
uint16_t interval_ms);
void led_off(
uint8_t index);
void led_off_delay(
uint8_t index,
uint32_t delay_ms);
void led_toggle(
uint8_t index);
bool led_state(
uint8_t index);
void led_task(
void);
void led_init(
void);
#else
/* dummy stubs */
#define led_on(x)
#define led_on_interval(x, ms)
#define led_off(x)
#define led_off_delay(x, ms)
#define led_toggle(x)
#define led_state(x)
#define led_task()
#define led_init()
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif