Changed ATmega168 port to ATmega328 on Uno R3 with DFR0259 RS485 shield (#784)

* Changed ATmega168 example for ATmega328 on Arduino Uno R3 with DFR0259 RS485 shield. Added ADC interface from BDK port and mapped to some AV objects. Removed MS/TP MAC address DIP switch GPIO and moved MS/TP configuration to AV objects. Added AV units property. Added some Uno R3 Digital Inputs and outputs mapped to some BV. Added AVR EEPROM from BDK port and mapped some non-volatile data including MAC address and max manager and baud rate, device ID and names and description and location.
This commit is contained in:
Steve Karg
2024-09-27 14:42:47 -05:00
committed by GitHub
parent 6e4034a92d
commit 4781582204
60 changed files with 2943 additions and 5661 deletions
+23
View File
@@ -0,0 +1,23 @@
/**
* @brief This module manages effective C bit manipulation for AVR
* @author Steve Karg <skarg@users.sourceforge.net>
* @date 2007
* @copyright SPDX-License-Identifier: MIT
* @note From AVR035: Efficient C Coding for AVR
*/
#ifndef AVR035_H
#define AVR035_H
/* a=register, b=bit number to act upon */
#define BIT_SET(a, b) ((a) |= (1 << (b)))
#define BIT_CLEAR(a, b) ((a) &= ~(1 << (b)))
#define BIT_FLIP(a, b) ((a) ^= (1 << (b)))
#define BIT_CHECK(a, b) ((a) & (1 << (b)))
/* x=target variable, y=mask */
#define BITMASK_SET(x, y) ((x) |= (y))
#define BITMASK_CLEAR(x, y) ((x) &= (~(y)))
#define BITMASK_FLIP(x, y) ((x) ^= (y))
#define BITMASK_CHECK(x, y) ((x) & (y))
#endif