Skip to content

Commit dd82905

Browse files
committed
[NUCLEO_L011K4] Move device.h defines to target.json
1 parent dcfec47 commit dd82905

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

hal/targets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,8 @@
847847
"default_toolchain": "uARM",
848848
"supported_form_factors": ["ARDUINO"],
849849
"detect_code": ["0780"],
850-
"progen": {"target":"nucleo-l011k4"}
850+
"progen": {"target":"nucleo-l011k4"},
851+
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "STDIO_MESSAGES"]
851852
},
852853
"NUCLEO_L031K6": {
853854
"inherits": ["Target"],

hal/targets/hal/TARGET_STM/TARGET_STM32L0/TARGET_NUCLEO_L011K4/device.h

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
13
/* mbed Microcontroller Library
24
*******************************************************************************
35
* Copyright (c) 2015, STMicroelectronics
@@ -30,41 +32,21 @@
3032
#ifndef MBED_DEVICE_H
3133
#define MBED_DEVICE_H
3234

33-
#define DEVICE_PORTIN 1
34-
#define DEVICE_PORTOUT 1
35-
#define DEVICE_PORTINOUT 1
3635

37-
#define DEVICE_INTERRUPTIN 1
3836

39-
#define DEVICE_ANALOGIN 1
40-
#define DEVICE_ANALOGOUT 0 // Not present on this device
4137

42-
#define DEVICE_SERIAL 1
4338

44-
#define DEVICE_I2C 1
45-
#define DEVICE_I2CSLAVE 1
4639

47-
#define DEVICE_SPI 1
48-
#define DEVICE_SPISLAVE 1
4940

50-
#define DEVICE_RTC 1
51-
#define DEVICE_RTC_LSI 0
5241

53-
#define DEVICE_PWMOUT 1
5442

55-
#define DEVICE_SLEEP 1
5643

5744
//=======================================
5845

59-
#define DEVICE_SEMIHOST 0
60-
#define DEVICE_LOCALFILESYSTEM 0
6146
#define DEVICE_ID_LENGTH 24
6247

63-
#define DEVICE_DEBUG_AWARENESS 0
6448

65-
#define DEVICE_STDIO_MESSAGES 1
6649

67-
#define DEVICE_ERROR_RED 0
6850

6951
#include "objects.h"
7052

0 commit comments

Comments
 (0)