Skip to content

Guard Atmel RF driver build by DEVICE_I2C #8327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "at24mac.h"
#include "PinNames.h"

#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C

#include "NanostackRfPhy.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#include <string.h>

#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_I2C

#include "platform/arm_hal_interrupt.h"
#include "nanostack/platform/arm_hal_phy.h"
Expand Down
4 changes: 4 additions & 0 deletions components/802.15.4_RF/atmel-rf-driver/source/at24mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
#include "at24mac.h"

#if DEVICE_I2C

/* Device addressing */
#define AT24MAC_EEPROM_ADDRESS (0x0A<<4)
#define AT24MAC_RW_PROTECT_ADDRESS (0x06<<4)
Expand Down Expand Up @@ -80,3 +82,5 @@ int AT24Mac::read_eui48(void *buf)
return -1; //No ACK
return _i2c.read(AT24MAC_SERIAL_ADDRESS, (char*)buf, EUI48_LEN);
}

#endif /* DEVICE_I2C */
4 changes: 4 additions & 0 deletions components/802.15.4_RF/atmel-rf-driver/source/at24mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#define AT24MAC_H

#include "PinNames.h"

#if DEVICE_I2C

#include "I2C.h"
#include "drivers/DigitalInOut.h"
#include "platform/mbed_wait_api.h"
Expand Down Expand Up @@ -71,4 +74,5 @@ class AT24Mac {
mbed::I2C _i2c;
};

#endif /* DEVICE_I2C */
#endif /* AT24MAC_H */