8000 stmhal: Initial implementation of cc3k module and driver. · comfuture/micropython@b766e79 · GitHub
[go: up one dir, main page]

Skip to content

Commit b766e79

Browse files
committed
stmhal: Initial implementation of cc3k module and driver.
Pulled in and modified work done by mux/iabdalkader on cc3k driver, from iabdalkader-cc3k-update branch. That branch was terribly messy and had too many conflicts to merge neatly.
1 parent f996d88 commit b766e79

File tree

13 files changed

+822
-23
lines changed

13 files changed

+822
-23
lines changed

stmhal/Makefile

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ HAL_DIR=hal
2222
USBDEV_DIR=usbdev
2323
#USBHOST_DIR=usbhost
2424
FATFS_DIR=fatfs
25-
CC3K_DIR=cc3k
2625
DFU=../tools/dfu.py
2726
# may need to prefix dfu-util with sudo
2827
DFU_UTIL ?= dfu-util
@@ -39,7 +38,6 @@ INC += -I$(HAL_DIR)/inc
3938
INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/cdc_msc_hid/inc
4039
#INC += -I$(USBHOST_DIR)
4140
INC += -I$(FATFS_DIR)/src
42-
INC += -I$(CC3K_DIR)
4341

4442
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
4543
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
@@ -187,19 +185,6 @@ SRC_FATFS = $(addprefix $(FATFS_DIR)/src/,\
187185
option/ccsbcs.c \
188186
)
189187

190-
SRC_CC3K = $(addprefix $(CC3K_DIR)/,\
191-
cc3000_common.c \
192-
evnt_handler.c \
193-
hci.c \
194-
netapp.c \
195-
nvmem.c \
196-
security.c \
197-
socket.c \
198-
wlan.c \
199-
ccspi.c \
200-
pybcc3k.c \
201-
)
202-
203188
ifeq ($(MICROPY_PY_WIZNET5K),1)
204189
WIZNET5K_DIR=drivers/wiznet5k
205190
INC += -I$(TOP)/$(WIZNET5K_DIR)
@@ -213,6 +198,30 @@ SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
213198
)
214199
endif
215200

201+
# for CC3000 module
202+
ifeq ($(MICROPY_PY_CC3K),1)
203+
CC3000_DIR=drivers/cc3000
204+
INC += -I$(TOP)/$(CC3000_DIR)/inc
205+
CFLAGS_MOD += -DMICROPY_PY_CC3K=1
206+
SRC_MOD += modcc3k.c
207+
SRC_MOD += $(addprefix $(CC3000_DIR)/src/,\
208+
cc3000_common.c \
209+
evnt_handler.c \
210+
hci.c \
211+
netapp.c \
212+
nvmem.c \
213+
security.c \
214+
socket.c \
215+
wlan.c \
216+
ccspi.c \
217+
inet_ntop.c \
218+
inet_pton.c \
219+
)
220+
# patch.c \
221+
# patch_prog.c \
222+
)
223+
endif
224+
216225
OBJ =
217226
OBJ += $(PY_O)
218227
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
@@ -221,7 +230,6 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
221230
OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o))
222231
OBJ += $(addprefix $(BUILD)/, $(SRC_USBDEV:.c=.o))
223232
OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
224-
OBJ += $(addprefix $(BUILD)/, $(SRC_CC3K:.c=.o))
225233
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
226234
OBJ += $(BUILD)/pins_$(BOARD).o
227235

stmhal/boards/HYDRABUS/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#define MICROPY_HW_ENABLE_I2C1 (1)
1717
#define MICROPY_HW_ENABLE_SPI1 (1)
1818
#define MICROPY_HW_ENABLE_SPI3 (1)
19-
#define MICROPY_HW_ENABLE_CC3K (0)
2019

2120
// USRSW/UBTN (Needs Jumper UBTN) is pulled low. Pressing the button makes the input go high.
2221
#define MICROPY_HW_USRSW_PIN (pin_A0)

stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#define MICROPY_HW_ENABLE_I2C1 (0)
2121
#define MICROPY_HW_ENABLE_SPI1 (0)
2222
#define MICROPY_HW_ENABLE_SPI3 (0)
23-
#define MICROPY_HW_ENABLE_CC3K (0)
2423

2524
// USRSW is pulled low. Pressing the button makes the input go high.
2625
#define MICROPY_HW_USRSW_PIN (pin_B11)

stmhal/boards/PYBV10/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#define MICROPY_HW_ENABLE_I2C1 (1)
1818
#define MICROPY_HW_ENABLE_SPI1 (1)
1919
#define MICROPY_HW_ENABLE_SPI3 (0)
20-
#define MICROPY_HW_ENABLE_CC3K (0)
2120

2221
// USRSW has no pullup or pulldown, and pressing the switch makes the input go low
2322
#define MICROPY_HW_USRSW_PIN (pin_B3)

stmhal/boards/PYBV3/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#define MICROPY_HW_ENABLE_I2C1 (1)
1717
#define MICROPY_HW_ENABLE_SPI1 (1)
1818
#define MICROPY_HW_ENABLE_SPI3 (0)
19-
#define MICROPY_HW_ENABLE_CC3K (0)
2019

2120
// USRSW has no pullup or pulldown, and pressing the switch makes the input go low
2221
#define MICROPY_HW_USRSW_PIN (pin_A13)

stmhal/boards/PYBV4/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#define MICROPY_HW_ENABLE_I2C1 (1)
1717
#define MICROPY_HW_ENABLE_SPI1 (1)
1818
#define MICROPY_HW_ENABLE_SPI3 (0)
19-
#define MICROPY_HW_ENABLE_CC3K (0)
2019

2120
// USRSW has no pullup or pulldown, and pressing the switch makes the input go low
2221
#define MICROPY_HW_USRSW_PIN (pin_B3)

stmhal/boards/STM32F4DISC/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#define MICROPY_HW_ENABLE_I2C1 (1)
1717
#define MICROPY_HW_ENABLE_SPI1 (1)
1818
#define MICROPY_HW_ENABLE_SPI3 (0)
19-
#define MICROPY_HW_ENABLE_CC3K (0)
2019

2120
// USRSW is pulled low. Pressing the button makes the input go high.
2221
#define MICROPY_HW_USRSW_PIN (pin_A0)

0 commit comments

Comments
 (0)
0