* Add critical section support Allows defining a code block which is executed as a critical section. Supports AVR, ESP8266 & SAMD. * Add receive message buffering When MY_RF24_IRQ_PIN is defined (and connected), a buffer will be used to retrieve & store messages received by nRF24 as fast as possible. This reduces the chance of losing messages due to a busy microcontroller. nRF24 SPI rx message transfer is running from interrupt context when MY_RF24_IRQ_PIN is defined. If this transfer takes too long, serial characters received will get lost. Therefore serial rx is enabled during SPI transfer of nRF messages. Limitations: Only AVR/SAMD & nRF24L01+ combinations can buffer rx messages. nRF24L01+ IRQ pin should be connected to AVR. Tested on W5100- & Serial-gateway. SAMD has not been tested yet! * Fix Doxygen warnings * Fix more Doxygen warnings
83 lines
2.0 KiB
C
83 lines
2.0 KiB
C
/**
|
|
* The MySensors Arduino library handles the wireless radio link and protocol
|
|
* between your home built sensors/actuators and HA controller of choice.
|
|
* The sensors forms a self healing radio network with optional repeaters. Each
|
|
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
|
* network topology allowing messages to be routed to nodes.
|
|
*
|
|
* Created by Tomas Hozza <thozza@gmail.com>
|
|
* Copyright (C) 2015 Tomas Hozza
|
|
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
|
|
*
|
|
* Documentation: http://www.mysensors.org
|
|
* Support Forum: http://forum.mysensors.org
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* version 2 as published by the Free Software Foundation.
|
|
*/
|
|
|
|
|
|
#ifndef MyCapabilities_h
|
|
#define MyCapabilities_h
|
|
|
|
#if defined(MY_DISABLE_REMOTE_RESET)
|
|
#define MY_CAP_RESET "N"
|
|
#else
|
|
#define MY_CAP_RESET "R"
|
|
#endif
|
|
|
|
#if defined(MY_OTA_FIRMWARE_FEATURE)
|
|
#define MY_CAP_OTA_FW "O"
|
|
#else
|
|
#define MY_CAP_OTA_FW "N"
|
|
#endif
|
|
|
|
|
|
#if defined(MY_RADIO_NRF24)
|
|
#define MY_CAP_RADIO "N"
|
|
#elif defined(MY_RADIO_RFM69)
|
|
#define MY_CAP_RADIO "R"
|
|
#elif defined(MY_RS485)
|
|
#define MY_CAP_RADIO "S"
|
|
#else
|
|
#define MY_CAP_RADIO "-"
|
|
#endif
|
|
|
|
#if defined(MY_GATEWAY_FEATURE)
|
|
#define MY_CAP_TYPE "G"
|
|
#elif defined(MY_REPEATER_FEATURE)
|
|
#define MY_CAP_TYPE "R"
|
|
#else
|
|
#define MY_CAP_TYPE "N"
|
|
#endif
|
|
|
|
#if defined(ARDUINO_ARCH_SAMD)
|
|
#define MY_CAP_ARCH "S"
|
|
#elif defined(ARDUINO_ARCH_ESP8266)
|
|
#define MY_CAP_ARCH "E"
|
|
#elif defined(ARDUINO_ARCH_AVR)
|
|
#define MY_CAP_ARCH "A"
|
|
#else
|
|
#define MY_CAP_ARCH "-"
|
|
#endif
|
|
|
|
#if defined(MY_SIGNING_ATSHA204)
|
|
#define MY_CAP_SIGN "A"
|
|
#elif defined(MY_SIGNING_SOFT)
|
|
#define MY_CAP_SIGN "S"
|
|
#else
|
|
#define MY_CAP_SIGN "-"
|
|
#endif
|
|
|
|
#if defined(MY_RX_MESSAGE_BUFFER_SIZE)
|
|
#define MY_CAP_RXBUF "Q"
|
|
#else
|
|
#define MY_CAP_RXBUF "-"
|
|
#endif
|
|
|
|
|
|
#define MY_CAPABILITIES MY_CAP_RESET MY_CAP_RADIO MY_CAP_OTA_FW MY_CAP_TYPE MY_CAP_ARCH MY_CAP_SIGN MY_CAP_RXBUF
|
|
|
|
#endif /* MyGatewayTransportEthernet_h */
|