4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 13:13:31 +08:00
kylepengchn 5810f4de7d
[components][drivers][spi]: 基于SPI总线驱动框架添加模拟SPI总线扩展 (#5656)
* add soft-spi

* add spi-bit-ops.c/h to components/drivers/spi
* add a drv_soft_spi example for gd32303e-eval

Signed-off-by: kyle <kylepengchn@163.com>

* Fixed the format and the certificate.

Signed-off-by: kyle <kylepengchn@163.com>

* Update the certificate data.

Signed-off-by: kyle <kylepengchn@163.com>
2022-03-23 14:16:14 +08:00

44 lines
1.1 KiB
Python

from building import *
import rtconfig
cwd = GetCurrentDir()
src = ['spi_core.c', 'spi_dev.c']
CPPPATH = [cwd, cwd + '/../include']
LOCAL_CFLAGS = ''
if GetDepend('RT_USING_SPI_BITOPS'):
src += ['spi-bit-ops.c']
if GetDepend('RT_USING_QSPI'):
src += ['qspi_core.c']
src_device = []
if GetDepend('RT_USING_SPI_WIFI'):
src_device += ['spi_wifi_rw009.c']
if GetDepend('RT_USING_ENC28J60'):
src_device += ['enc28j60.c']
if GetDepend('RT_USING_SPI_MSD'):
src_device += ['spi_msd.c']
if GetDepend('RT_USING_SFUD'):
src_device += ['spi_flash_sfud.c', 'sfud/src/sfud.c']
CPPPATH += [cwd + '/sfud/inc']
if GetDepend('RT_SFUD_USING_SFDP'):
src_device += ['sfud/src/sfud_sfdp.c']
if rtconfig.PLATFORM == 'gcc':
LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc':
LOCAL_CFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CFLAGS += ' -std=c99'
src += src_device
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SPI'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
Return('group')