Skip to content

Commit

Permalink
boards/atmega*: changes for new GPIO API
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Jul 26, 2020
1 parent 7fcd816 commit 27f7dd8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
9 changes: 5 additions & 4 deletions boards/atmega256rfr2-xpro/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define BOARD_H

#include "cpu.h"
#include "periph_cpu.h"
#include "periph/gpio.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -48,10 +49,10 @@ extern "C" {
*/
#define LED0_PIN GPIO_PIN(PORT_B, 4)
#define LED0_MODE GPIO_OUT
#define LED0_ENABLE_PORT DDRB |= LED0_PIN
#define LED0_ON PORTB |= LED0_PIN
#define LED0_OFF PORTB &= ~LED0_PIN
#define LED0_TOGGLE PORTB ^= LED0_PIN
#define LED0_ENABLE_PORT DDRB |= LED0_PIN.pin
#define LED0_ON PORTB |= LED0_PIN.pin
#define LED0_OFF PORTB &= ~LED0_PIN.pin
#define LED0_TOGGLE PORTB ^= LED0_PIN.pin
/** @} */

/**
Expand Down
1 change: 1 addition & 0 deletions boards/avr-rss2/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "cpu.h"
#include "periph/gpio.h"
#include "periph_cpu.h"

#ifdef __cplusplus
extern "C" {
Expand Down
18 changes: 9 additions & 9 deletions boards/mega-xplained/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ extern "C" {
* @{
*/
/* LED0,2 currently unsupported due to lack of GPIO_OD support */
#define LED1_ENABLE_PORT DDRB |= LED1_PIN
#define LED1_ON PORTB |= LED1_PIN
#define LED1_OFF PORTB &= ~LED1_PIN
#define LED1_TOGGLE PORTB ^= LED1_PIN

#define LED3_ENABLE_PORT DDRB |= LED3_PIN
#define LED3_ON PORTB |= LED3_PIN
#define LED3_OFF PORTB &= ~LED3_PIN
#define LED3_TOGGLE PORTB ^= LED3_PIN
#define LED1_ENABLE_PORT DDRB |= LED1_PIN.pin
#define LED1_ON PORTB |= LED1_PIN.pin
#define LED1_OFF PORTB &= ~LED1_PIN.pin
#define LED1_TOGGLE PORTB ^= LED1_PIN.pin

#define LED3_ENABLE_PORT DDRB |= LED3_PIN.pin
#define LED3_ON PORTB |= LED3_PIN.pin
#define LED3_OFF PORTB &= ~LED3_PIN.pin
#define LED3_TOGGLE PORTB ^= LED3_PIN.pin
/** @} */

/**
Expand Down

0 comments on commit 27f7dd8

Please sign in to comment.