Skip to content

Commit

Permalink
cpu/atmega*: move EEPROM lengths to periph_conf
Browse files Browse the repository at this point in the history
IMHO EEPROM is more a peripheral than a CPU entity, so their size
belongs to periph_cpu.h
  • Loading branch information
kYc0o committed May 25, 2018
1 parent 0462f24 commit 02cfde4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 9 deletions.
11 changes: 9 additions & 2 deletions cpu/atmega1281/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ enum {
* @name Defines for the I2C interface
* @{
*/
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD0) | (1 << PORTD1)
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD0) | (1 << PORTD1)
/** @} */

/**
* @name EEPROM configuration
* @{
*/
#define EEPROM_SIZE (4096U) /* 4kB */
/** @} */

#ifdef __cplusplus
Expand Down
11 changes: 9 additions & 2 deletions cpu/atmega2560/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ enum {
* @name Defines for the I2C interface
* @{
*/
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD0) | (1 << PORTD1)
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD0) | (1 << PORTD1)
/** @} */

/**
* @name EEPROM configuration
* @{
*/
#define EEPROM_SIZE (4096U) /* 4kB */
/** @} */

#ifdef __cplusplus
Expand Down
13 changes: 10 additions & 3 deletions cpu/atmega256rfr2/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,26 @@ enum {
* @name Defines for the I2C interface
* @{
*/
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD1) | (1 << PORTD0)
#define I2C_PORT_REG PORTD
#define I2C_PIN_MASK (1 << PORTD1) | (1 << PORTD0)
/** @} */

/**
* @name GPIO pin not defined
* @{
*/
#ifndef GPIO_UNDEF
#define GPIO_UNDEF (0xFFFF)
#define GPIO_UNDEF (0xFFFF)
#endif
/** @}*/

/**
* @name EEPROM configuration
* @{
*/
#define EEPROM_SIZE (8192U) /* 8kB */
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
11 changes: 9 additions & 2 deletions cpu/atmega328p/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ enum {
* @name Defines for the I2C interface
* @{
*/
#define I2C_PORT_REG PORTC
#define I2C_PIN_MASK (1 << PORTC4) | (1 << PORTC5)
#define I2C_PORT_REG PORTC
#define I2C_PIN_MASK (1 << PORTC4) | (1 << PORTC5)
/** @} */

/**
* @name EEPROM configuration
* @{
*/
#define EEPROM_SIZE (1024U) /* 1kB */
/** @} */

#ifdef __cplusplus
Expand Down

0 comments on commit 02cfde4

Please sign in to comment.