Adding support for AtMega128RFR2 and AtMega256RFR2
This commit is contained in:
parent
93b9089164
commit
d3980668ee
9 changed files with 478 additions and 30 deletions
|
@ -78,6 +78,7 @@
|
|||
#define ZIGBIT 4
|
||||
#define IRIS 5
|
||||
#define ATMEGA128RFA1 6
|
||||
#define ATMEGA256RFR2 7
|
||||
|
||||
#if PLATFORM_TYPE == RCB_B
|
||||
/* 1281 rcb */
|
||||
|
@ -145,6 +146,11 @@
|
|||
# define SLPTRPORT TRXPR
|
||||
# define SLPTRPIN 1
|
||||
|
||||
#elif PLATFORM_TYPE == ATMEGA256RFR2
|
||||
/* ATmega1281 with internal AT86RF231 radio */
|
||||
# define SLPTRPORT TRXPR
|
||||
# define SLPTRPIN 1
|
||||
|
||||
#elif CONTIKI_TARGET_MULLE
|
||||
/* mulle 5.2 (TODO: move to platform specific) */
|
||||
# define SSPORT 3
|
||||
|
@ -233,7 +239,7 @@
|
|||
* that the source code can directly use.
|
||||
* \{
|
||||
*/
|
||||
#if defined(__AVR_ATmega128RFA1__)
|
||||
#if defined(__AVR_ATmega128RFA1__) || defined(__AVR_ATmega128RFR2__) || defined(__AVR_ATmega256RFR2__)
|
||||
|
||||
#define hal_set_rst_low( ) ( TRXPR &= ~( 1 << TRXRST ) ) /**< This macro pulls the RST pin low. */
|
||||
#define hal_set_rst_high( ) ( TRXPR |= ( 1 << TRXRST ) ) /**< This macro pulls the RST pin high. */
|
||||
|
@ -274,7 +280,7 @@
|
|||
#define HAL_DD_SCK SCKPIN /**< Data Direction bit for SCK. */
|
||||
#define HAL_DD_MOSI MOSIPIN /**< Data Direction bit for MOSI. */
|
||||
#define HAL_DD_MISO MISOPIN /**< Data Direction bit for MISO. */
|
||||
#endif /* defined(__AVR_ATmega128RFA1__) */
|
||||
#endif /* defined(__AVR_ATmega128RFA1__) || defined(__AVR_ATmega256RFR2__) */
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -367,7 +373,7 @@ typedef struct{
|
|||
void hal_init( void );
|
||||
|
||||
/* Hack for atmega128rfa1 with integrated radio. Access registers directly, not through SPI */
|
||||
#if defined(__AVR_ATmega128RFA1__)
|
||||
#if defined(__AVR_ATmega128RFA1__) || defined(__AVR_ATmega128RFR2__) || defined(__AVR_ATmega256RFR2__)
|
||||
//#define hal_register_read(address) _SFR_MEM8((uint16_t)address)
|
||||
#define hal_register_read(address) address
|
||||
uint8_t hal_subregister_read( uint16_t address, uint8_t mask, uint8_t position );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue