Skip to content

Commit df6bd2f

Browse files
committed
Changed the drivers HAL implementations to the ones using NRF5 SDK, moved nrf_drv_config.h to MCU specific targets, updated lists of device features, so non-compiling stuff is excluded from build.
1 parent 96a1759 commit df6bd2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+13277
-4353
lines changed

hal/targets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@
13881388
"supported_form_factors": ["ARDUINO"],
13891389
"inherits": ["MCU_NRF51_32K"],
13901390
"progen": {"target": "nrf51-dk"},
1391-
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
1391+
"device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "SERIAL", "RTC", "SERIAL_ASYNCH", "SLEEP"]
13921392
},
13931393
"NRF51_DK_BOOT": {
13941394
"supported_form_factors": ["ARDUINO"],
@@ -1764,6 +1764,6 @@
17641764
"supported_form_factors": ["ARDUINO"],
17651765
"inherits": ["MCU_NRF52"],
17661766
"progen": {"target": "nrf52-dk"},
1767-
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
1767+
"device_has": ["ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP"]
17681768
}
17691769
}

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/analogin_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include "cmsis.h"
1919
#include "pinmap.h"
2020

21+
#ifdef DEVICE_ANALOGIN
22+
2123
#define ANALOGIN_MEDIAN_FILTER 1
2224
#define ADC_10BIT_RANGE 0x3FF
2325
#define ADC_RANGE ADC_10BIT_RANGE
@@ -79,3 +81,5 @@ float analogin_read(analogin_t *obj)
7981
uint16_t value = analogin_read_u16(obj);
8082
return (float)value * (1.0f / (float)ADC_RANGE);
8183
}
84+
85+
#endif // DEVICE_ANALOGIN

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_api.c

Lines changed: 0 additions & 58 deletions
This file was deleted.

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_irq_api.c

Lines changed: 0 additions & 127 deletions
This file was deleted.

hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/gpio_object.h

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)