mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Merged in alinjerpelea/nuttx (pull request #967)
group boards based on chip
* a1x: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* am335x: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* c5471: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* scx56xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* dm320: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* efm32: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* imx6: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* imxrt: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* kinetis: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* kl: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lc823450: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc17xx_40xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc214x: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc2378: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc31xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc43xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc54xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* max326xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* moxart: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nrf52: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nuc1xx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam34: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sama5: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* samd2l2: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* samd5e5: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* samv7: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f0l0g0: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f7: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32h7: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32l4: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* str71x: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tiva: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tms570: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* xmc4: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* p112: typo fix
this boars is a z80 board and was moved to the wrong arch
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* avr: at32uc3: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* avr: at90usb: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* avr: atmega: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* hc: mcs92s12ne64: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mips: pic32mx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mips: pic32mz: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* misoc: lm32: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* or1k: mor1kx: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* renesas: m32262f8: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* renesas: sh7032: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* risk-v: gap8: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* risk-v: nr5m100: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sim: sim: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* x86: qemu: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* xtensa: esp32: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z16: z16f2811: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: ez80: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: z180: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: z80: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: z8: group boards based on chip
All boards based on the same chip are moved to the same folder
following the arch layout <arch>/<chip>/<board>.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tools: update tools for boards based on chip
This patch updates only the linux tools
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* pcduino-a10: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* beaglebone-black: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* c5471evm: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* spresense: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* ntosd-dm320: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* efm32-g8xx-stk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* efm32gg-stk3700: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-efm32g880f128-stk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sabre-6quad: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* imxrt1050-evk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* imxrt1060-evk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* freedom-k28f: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* freedom-k64f: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* freedom-k66f: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* kwikstik-k40: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* teensy-3.x: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* twr-k60n512: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* twr-k64f120m: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* freedom-kl25z: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* freedom-kl26z: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* teensy-lc: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lc823450: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lincoln60: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4088-devkit: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4088-quickstart: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpcxpresso-lpc1768: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mbed: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mcb1700: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-lpc1766stk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* open1788: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* pnev5180b: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* u-blox-c027: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* zkit-arm-1769: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mcu123-lpc214x: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* zp214xpa: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-lpc2378: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* ea3131: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* ea3152: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-lpc-h3131: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* bambino-200e: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4330-xplorer: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4337-ws: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4337-evb: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpc4370-link2: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lpcxpresso-lpc54628: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* max32660-evsys: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* moxa: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nrf52-generic: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nutiny-nuc120: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* arduino-due: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* flipnclick-sam3x: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam3u-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam4cmp-db: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam4e-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam4l-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam4s-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sam4s-xplained-pro: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sama5d2-xult: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sama5d3-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sama5d3x-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sama5d4-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* samd20-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* samd21-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* saml21-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* metro-m4: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* same70-xplained: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* same71-xult: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* axoloti: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* clicker2-stm32: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* cloudctrl: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* fire-stm32v2: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* hymini-stm32v: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* maple: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* mikroe-stm32f4: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f103rb: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f207zg: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f302r8: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f303re: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f303ze: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f334r8: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f410rb: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f446re: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f4x1re: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-1152re: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-e407: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-h405: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-h407: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-p107: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-p207: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32-p407: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-stm32: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* omnibusf4: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* photon: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* shenzou: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm3210e-eval: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm3220g-eval: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm3240g-eval: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32_tiny: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32butterfly2: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f103-minimum: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f334-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f3discovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f411e-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f429i-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f4discovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32ldiscovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32vldiscovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* viewtool-stm32f107: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* b-l072z-lrwan1: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f072rb: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f091rc: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-f071rg: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-l073rz: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f051-discovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f072-discovery: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-144: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f746-ws: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f746g-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32f746g-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-h743zi: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* b-l475e-iot01a: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-l432kc: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-l432re: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-l476rg: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* nucleo-l496zg: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32l476-mdk: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32l476vg-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* stm32l4r9ai-disco: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* olimex-strp711: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* dk-tm4c129x: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* eagle100: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* ekk-lm3s9b96: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* launchxl-cc1310: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* launchxl-cc1312r1: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm3s6432-s2e: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm3s6965-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm3s8962-ek: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm4f120-launchpad: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm4c123g-launchpad: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* lm4c1294-launchpad: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* launchxl-tms57004: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* tms570ls31x-usb-kit: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* xmc4500-relax: defconfig update
add ARCH_CHIP to defconfig
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* zp214xpa: typo fix
add missing tools/oocd.sh
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
committed by
Gregory Nutt
parent
a1f1adb878
commit
1358e829ad
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_B_L072Z_LRWAN1
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,2 @@
|
||||
B-L072Z-LRWAN1
|
||||
==============
|
||||
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
CONFIG_ADC=y
|
||||
CONFIG_ANALOG=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="b-l072z-lrwan1"
|
||||
CONFIG_ARCH_BOARD_B_L072Z_LRWAN1=y
|
||||
CONFIG_ARCH_CHIP="stm32f0l0g0"
|
||||
CONFIG_ARCH_CHIP_STM32L072CZ=y
|
||||
CONFIG_ARCH_CHIP_STM32L072XX=y
|
||||
CONFIG_ARCH_CHIP_STM32L0=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2796
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y
|
||||
CONFIG_EXAMPLES_ADC=y
|
||||
CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_MAX_TASKS=8
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_NFILE_DESCRIPTORS=6
|
||||
CONFIG_NFILE_STREAMS=6
|
||||
CONFIG_NPTHREAD_KEYS=0
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=64
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_PTHREAD_MUTEX_UNSAFE=y
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=1536
|
||||
CONFIG_RAM_SIZE=20480
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2013
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_STM32F0L0G0_ADC1=y
|
||||
CONFIG_STM32F0L0G0_ADC1_DMA=y
|
||||
CONFIG_STM32F0L0G0_DMA1=y
|
||||
CONFIG_STM32F0L0G0_PWR=y
|
||||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USERMAIN_STACKSIZE=1536
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="b-l072z-lrwan1"
|
||||
CONFIG_ARCH_BOARD_B_L072Z_LRWAN1=y
|
||||
CONFIG_ARCH_CHIP="stm32f0l0g0"
|
||||
CONFIG_ARCH_CHIP_STM32L072CZ=y
|
||||
CONFIG_ARCH_CHIP_STM32L0=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2796
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_MAX_TASKS=8
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_NFILE_DESCRIPTORS=6
|
||||
CONFIG_NFILE_STREAMS=6
|
||||
CONFIG_NPTHREAD_KEYS=0
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=64
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_PTHREAD_MUTEX_UNSAFE=y
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=1536
|
||||
CONFIG_RAM_SIZE=20480
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2013
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_STM32F0L0G0_PWR=y
|
||||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USERMAIN_STACKSIZE=1536
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
@@ -0,0 +1,73 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NX_DISABLE_1BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="b-l072z-lrwan1"
|
||||
CONFIG_ARCH_BOARD_B_L072Z_LRWAN1=y
|
||||
CONFIG_ARCH_CHIP="stm32f0l0g0"
|
||||
CONFIG_ARCH_CHIP_STM32L072CZ=y
|
||||
CONFIG_ARCH_CHIP_STM32L072XX=y
|
||||
CONFIG_ARCH_CHIP_STM32L0=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2796
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=1
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=1
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xff
|
||||
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=1
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_SH1106_OLED_132=y
|
||||
CONFIG_LCD_SSD1306_I2C=y
|
||||
CONFIG_MAX_TASKS=8
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS=6
|
||||
CONFIG_NFILE_STREAMS=6
|
||||
CONFIG_NPTHREAD_KEYS=0
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=64
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_MONO5X8=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_PTHREAD_MUTEX_UNSAFE=y
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=1536
|
||||
CONFIG_RAM_SIZE=20480
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2013
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_STM32F0L0G0_I2C1=y
|
||||
CONFIG_STM32F0L0G0_PWR=y
|
||||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NSH_STACKSIZE=1024
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USERMAIN_STACKSIZE=1536
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
@@ -0,0 +1,70 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="b-l072z-lrwan1"
|
||||
CONFIG_ARCH_BOARD_B_L072Z_LRWAN1=y
|
||||
CONFIG_ARCH_CHIP="stm32f0l0g0"
|
||||
CONFIG_ARCH_CHIP_STM32L072CZ=y
|
||||
CONFIG_ARCH_CHIP_STM32L0=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=2796
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y
|
||||
CONFIG_DRIVERS_LPWAN=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_SX127X=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LPWAN_SX127X=y
|
||||
CONFIG_LPWAN_SX127X_FSKOOK=y
|
||||
CONFIG_LPWAN_SX127X_MODULATION_DEFAULT=1
|
||||
CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT=930000000
|
||||
CONFIG_LPWAN_SX127X_RXSUPPORT=y
|
||||
CONFIG_LPWAN_SX127X_TXSUPPORT=y
|
||||
CONFIG_MAX_TASKS=8
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_NFILE_DESCRIPTORS=6
|
||||
CONFIG_NFILE_STREAMS=6
|
||||
CONFIG_NPTHREAD_KEYS=0
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=64
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
CONFIG_PREALLOC_TIMERS=0
|
||||
CONFIG_PREALLOC_WDOGS=4
|
||||
CONFIG_PTHREAD_MUTEX_UNSAFE=y
|
||||
CONFIG_PTHREAD_STACK_DEFAULT=1536
|
||||
CONFIG_RAM_SIZE=20480
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2013
|
||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||
CONFIG_STM32F0L0G0_PWR=y
|
||||
CONFIG_STM32F0L0G0_SPI1=y
|
||||
CONFIG_STM32F0L0G0_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USERMAIN_STACKSIZE=1536
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_WDOG_INTRESERVE=0
|
||||
@@ -0,0 +1,261 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/include/board.h
|
||||
* include/arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_B_L072Z_LRWAN1_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM_B_L072Z_LRWAN1_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* HSI - Internal 16 MHz RC Oscillator
|
||||
* LSI - 32 KHz RC
|
||||
* HSE - 8 MHz from MCO output of ST-LINK (default OFF on board)
|
||||
* LSE - 32.768 kHz
|
||||
*/
|
||||
|
||||
#define STM32_BOARD_XTAL 8000000ul
|
||||
|
||||
#define STM32_HSI_FREQUENCY 16000000ul
|
||||
#define STM32_LSI_FREQUENCY 32000 /* Between 30kHz and 60kHz */
|
||||
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
|
||||
#define STM32_LSE_FREQUENCY 32768 /* X2 on board */
|
||||
|
||||
/* PLL source is HSI/1, PLL multipler is 4: PLL frequency is 16MHz (XTAL) x 4 = 64MHz */
|
||||
|
||||
#define STM32_CFGR_PLLSRC 0
|
||||
#define STM32_CFGR_PLLXTPRE 0
|
||||
#define STM32_CFGR_PLLMUL RCC_CFGR_PLLMUL_CLKx4
|
||||
#define STM32_PLL_FREQUENCY (4*STM32_HSI_FREQUENCY)
|
||||
|
||||
/* Use the PLL and set the SYSCLK source to be the PLL/2 (32MHz) */
|
||||
|
||||
#define STM32_SYSCLK_SW RCC_CFGR_SW_PLL
|
||||
#define STM32_SYSCLK_SWS RCC_CFGR_SWS_PLL
|
||||
#define STM32_CFGR_PLLDIV RCC_CFGR_PLLDIV_2
|
||||
#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY/2
|
||||
|
||||
/* AHB clock (HCLK) is SYSCLK (32MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK
|
||||
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
|
||||
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY
|
||||
|
||||
/* APB2 clock (PCLK2) is HCLK (32MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK
|
||||
#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY
|
||||
#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY)
|
||||
|
||||
/* APB1 clock (PCLK1) is HCLK/2 (16MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2
|
||||
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* 48MHz clock configuration */
|
||||
|
||||
#if defined(CONFIG_STM32F0L0G0_USB) || defined(CONFIG_STM32F0L0G0_RNG)
|
||||
# define STM32_USE_CLK48 1
|
||||
# define STM32_CLK48_SEL RCC_CCIPR_CLK48SEL_HSI48
|
||||
# define STM32_HSI48_SYNCSRC SYNCSRC_NONE
|
||||
#endif
|
||||
|
||||
/* TODO: timers */
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
/* The Nucleo LO73RZ board has three LEDs. Two of these are controlled by
|
||||
* logic on the board and are not available for software control:
|
||||
*
|
||||
* LD1 COM: LD1 default status is red. LD1 turns to green to indicate that
|
||||
* communications are in progress between the PC and the
|
||||
* ST-LINK/V2-1.
|
||||
* LD3 PWR: red LED indicates that the board is powered.
|
||||
*
|
||||
* And one can be controlled by software:
|
||||
*
|
||||
* User LD2: green LED is a user LED connected to the I/O PA5 of the
|
||||
* STM32LO73RZ.
|
||||
*
|
||||
* If CONFIG_ARCH_LEDS is not defined, then the user can control the LED in
|
||||
* any way. The following definition is used to access the LED.
|
||||
*/
|
||||
|
||||
/* LED index values for use with board_userled() */
|
||||
|
||||
#define BOARD_LED1 0 /* User LD2 */
|
||||
#define BOARD_NLEDS 1
|
||||
|
||||
/* LED bits for use with board_userled_all() */
|
||||
|
||||
#define BOARD_LED1_BIT (1 << BOARD_LED1)
|
||||
|
||||
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on board
|
||||
* the Nucleo LO73RZ. The following definitions describe how NuttX controls
|
||||
* the LED:
|
||||
*
|
||||
* SYMBOL Meaning LED1 state
|
||||
* ------------------ ----------------------- ----------
|
||||
* LED_STARTED NuttX has been started OFF
|
||||
* LED_HEAPALLOCATE Heap has been allocated OFF
|
||||
* LED_IRQSENABLED Interrupts enabled OFF
|
||||
* LED_STACKCREATED Idle stack created ON
|
||||
* LED_INIRQ In an interrupt No change
|
||||
* LED_SIGNAL In a signal handler No change
|
||||
* LED_ASSERTION An assertion failed No change
|
||||
* LED_PANIC The system has crashed Blinking
|
||||
* LED_IDLE STM32 is is sleep mode Not used
|
||||
*/
|
||||
|
||||
#define LED_STARTED 0
|
||||
#define LED_HEAPALLOCATE 0
|
||||
#define LED_IRQSENABLED 0
|
||||
#define LED_STACKCREATED 1
|
||||
#define LED_INIRQ 2
|
||||
#define LED_SIGNAL 2
|
||||
#define LED_ASSERTION 2
|
||||
#define LED_PANIC 1
|
||||
|
||||
/* Button definitions *******************************************************/
|
||||
/* The Nucleo LO73RZ supports two buttons; only one button is controllable
|
||||
* by software:
|
||||
*
|
||||
* B1 USER: user button connected to the I/O PB2/PA0 of the STM32LO73RZ.
|
||||
* B2 RESET: push button connected to NRST is used to RESET the
|
||||
* STM32LO73RZ.
|
||||
*/
|
||||
|
||||
#define BUTTON_USER 0
|
||||
#define NUM_BUTTONS 1
|
||||
|
||||
#define BUTTON_USER_BIT (1 << BUTTON_USER)
|
||||
|
||||
/* Alternate function pin selections ****************************************/
|
||||
|
||||
/* CMWX1ZZABZ-091 module pinout and internal connections
|
||||
*
|
||||
* STM32L072CZ | Function
|
||||
* ------------+-----------
|
||||
* PC0 | SX1276_CE (NRESET)
|
||||
* PA7 | SX1276_MOSI
|
||||
* PA6 | SX1276_MISO
|
||||
* PB3 | SX1276_SCK
|
||||
* PA15 | SX1276_NSS
|
||||
* PB4 | SX1276_DIO0
|
||||
* PB1 | SX1276_DIO1
|
||||
* PB0 | SX1276_DIO2
|
||||
* PC13 | SX1276_DIO3
|
||||
* PA5 | SX1276_DIO4 optional / LED5
|
||||
* PA4 | SX1276_DIO5 optional
|
||||
* PA1 | CRF1
|
||||
* PC1 | CRF2
|
||||
* PC2 | CRF3
|
||||
* PA3 | STLINK Virtual COM RX
|
||||
* PA2 | STLINK Virtual COM TX
|
||||
* PA10 | USART1_RX
|
||||
* PA9 | USART1_TX
|
||||
* PB15 | SPI2_MOSI
|
||||
* PB14 | SPI2_MISO
|
||||
* PB13 | SPI2_SCK
|
||||
* PB12 | SPI2_NSS
|
||||
* PB5 | LPTIM1_INI / LED2
|
||||
* PB6 | LPTIM1_ETR / LED3
|
||||
* PB7 | LPTIM1_IN2 / LED4
|
||||
* PB2 | LPTIM1_OUT / BUTTON
|
||||
* PA0 | BUTTON (optional)
|
||||
* PB9 | I2C1_SDA
|
||||
* PB8 | I2C1_SCL
|
||||
* PA12 | USB_DP optional / TCXO_VCC
|
||||
* PA11 | USB_DM optional
|
||||
*
|
||||
*/
|
||||
|
||||
/* USART */
|
||||
|
||||
/* USART1 */
|
||||
|
||||
#define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
|
||||
#define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */
|
||||
|
||||
/* By default the USART2 is connected to STLINK Virtual COM Port:
|
||||
* USART2_RX - PA3
|
||||
* USART2_TX - PA2
|
||||
*/
|
||||
|
||||
#define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */
|
||||
#define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */
|
||||
|
||||
/* SPI */
|
||||
|
||||
/* SPI1 is connected to SX1276 radio */
|
||||
|
||||
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_2 /* PA7 */
|
||||
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_2 /* PA6 */
|
||||
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_2 /* PB3 */
|
||||
#define GPIO_SPI1_NSS GPIO_SPI1_NSS_1 /* PA15 */
|
||||
|
||||
/* SPI2 */
|
||||
|
||||
#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1 /* PB15 */
|
||||
#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1 /* PB14 */
|
||||
#define GPIO_SPI2_SCK GPIO_SPI2_SCK_3 /* PB13 */
|
||||
#define GPIO_SPI2_NSS GPIO_SPI2_NSS_1 /* PB12 */
|
||||
|
||||
/* I2C */
|
||||
|
||||
/* I2C1 */
|
||||
|
||||
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 /* PB9 */
|
||||
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 /* PB8 */
|
||||
|
||||
/* DMA channels *************************************************************/
|
||||
/* ADC */
|
||||
|
||||
#define ADC1_DMA_CHAN DMACHAN_ADC1_1 /* DMA1_CH1 */
|
||||
|
||||
#endif /* __BOARDS_ARM_NUCLEO_LO73RZ_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,114 @@
|
||||
############################################################################
|
||||
# boards/b-l072z-lrwan1/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
include ${TOPDIR}/arch/arm/src/armv6-m/Toolchain.defs
|
||||
|
||||
LDSCRIPT = ld.script
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
|
||||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
CXX = $(CROSSDEV)g++
|
||||
CPP = $(CROSSDEV)gcc -E
|
||||
LD = $(CROSSDEV)ld
|
||||
STRIP = $(CROSSDEV)strip --strip-unneeded
|
||||
AR = $(ARCROSSDEV)ar rcs
|
||||
NM = $(ARCROSSDEV)nm
|
||||
OBJCOPY = $(CROSSDEV)objcopy
|
||||
OBJDUMP = $(CROSSDEV)objdump
|
||||
|
||||
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
|
||||
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHDEFINES =
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
ASMEXT = .S
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The STM32LO72CZ has 192Kb of FLASH beginning at address 0x0800:0000.
|
||||
* 20Kb of SRAM and 6Kb of EEPROM
|
||||
*
|
||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||
* where the code expects to begin execution by jumping to the entry point in
|
||||
* the 0x0800:0000 address range.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 192K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
. = ALIGN(4);
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
. = ALIGN(4);
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
. = ALIGN(4);
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
/* The RAM vector table (if present) should lie at the beginning of SRAM */
|
||||
|
||||
.ram_vectors : {
|
||||
*(.ram_vectors)
|
||||
} > sram
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
############################################################################
|
||||
# boards/b-l072z-lrwan1/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
# Author: Mateusz Szafoni <raiden00@railab.me>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
ASRCS =
|
||||
CSRCS = stm32_boot.c stm32_bringup.c
|
||||
|
||||
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += stm32_autoleds.c
|
||||
else
|
||||
CSRCS += stm32_userleds.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
||||
CSRCS += stm32_buttons.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STM32F0L0G0_SPI),y)
|
||||
CSRCS += stm32_spi.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||
CSRCS += stm32_appinit.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LPWAN_SX127X),y)
|
||||
CSRCS += stm32_sx127x.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ADC),y)
|
||||
CSRCS += stm32_adc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LCD_SSD1306),y)
|
||||
CSRCS += stm32_ssd1306.c
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
@@ -0,0 +1,180 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/b-l072z-lrwan1.h
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_B_L072Z_LRWAN1_SRC_B_L072Z_LRWAN1_H
|
||||
#define __BOARDS_ARM_B_L072Z_LRWAN1_SRC_B_L072Z_LRWAN1_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
/* The Nucleo L073RZ board has three LEDs. Two of these are controlled by
|
||||
* logic on the board and are not available for software control:
|
||||
*
|
||||
* LD1 COM: LD1 default status is red. LD1 turns to green to indicate that
|
||||
* communications are in progress between the PC and the
|
||||
* ST-LINK/V2-1.
|
||||
* LD3 PWR: red LED indicates that the board is powered.
|
||||
*
|
||||
* And one can be controlled by software:
|
||||
*
|
||||
* User LD2: green LED is a user LED connected to the I/O PA5 of the
|
||||
* STM32L073RZT6.
|
||||
*
|
||||
* If CONFIG_ARCH_LEDS is not defined, then the user can control the LED in
|
||||
* any way. The following definition is used to access the LED.
|
||||
*/
|
||||
|
||||
#define GPIO_LED1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_HIGH |\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTA | GPIO_PIN5)
|
||||
#define GPIO_LED2 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_HIGH | \
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB | GPIO_PIN5)
|
||||
#define GPIO_LED3 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_HIGH | \
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB | GPIO_PIN6)
|
||||
#define GPIO_LED4 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_HIGH | \
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTB | GPIO_PIN7)
|
||||
|
||||
#define LED_DRIVER_PATH "/dev/userleds"
|
||||
|
||||
/* Button definitions *******************************************************/
|
||||
/* The Nucleo L073RZ supports two buttons; only one button is controllable
|
||||
* by software:
|
||||
*
|
||||
* B1 USER: user button connected to the I/O PC13 of the STM32L073RZT6.
|
||||
* B2 RESET: push button connected to NRST is used to RESET the
|
||||
* STM32L073RZT6.
|
||||
*
|
||||
* NOTE that EXTI interrupts are configured.
|
||||
*/
|
||||
|
||||
#define MIN_IRQBUTTON BUTTON_USER
|
||||
#define MAX_IRQBUTTON BUTTON_USER
|
||||
#define NUM_IRQBUTTONS 1
|
||||
|
||||
#define GPIO_BTN_USER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13)
|
||||
|
||||
/* SX1276
|
||||
* RESET - PC0 (active low)
|
||||
* CS - PA15
|
||||
* DIO0 - PB4
|
||||
*/
|
||||
|
||||
#define GPIO_SX127X_RESET (GPIO_PORTC | GPIO_PIN0)
|
||||
#define GPIO_SX127X_CS (GPIO_OUTPUT | GPIO_SPEED_HIGH | \
|
||||
GPIO_OUTPUT_SET | GPIO_PORTA | GPIO_PIN15)
|
||||
#define GPIO_SX127X_DIO0 (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | \
|
||||
GPIO_PORTB | GPIO_PIN4)
|
||||
|
||||
/* CMWX1ZZABZ-091 module antenna switch
|
||||
* CRF1 - RX RFI HF - PA1
|
||||
* CRF2 - TX RFO HF - PC2
|
||||
* CRF3 - TX BOOST - PC1
|
||||
*/
|
||||
|
||||
#define GPIO_SX127X_CRF1 (GPIO_SPEED_HIGH | GPIO_PORTA | GPIO_PIN1)
|
||||
#define GPIO_SX127X_CRF2 (GPIO_SPEED_HIGH | GPIO_PORTC | GPIO_PIN2)
|
||||
#define GPIO_SX127X_CRF3 (GPIO_SPEED_HIGH | GPIO_PORTC | GPIO_PIN1)
|
||||
|
||||
/* Oled configuration */
|
||||
|
||||
#define OLED_I2C_PORT 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y :
|
||||
* Called from the NSH library
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int stm32_bringup(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the Nucleo-H743ZI board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI
|
||||
void stm32_spidev_initialize(void);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Name: stm32_lpwaninitialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize SX127X LPWAN interaface.
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPWAN_SX127X
|
||||
int stm32_lpwaninitialize(void);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_adc_setup
|
||||
*
|
||||
* Description:
|
||||
* Initialize ADC and register the ADC driver.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ADC
|
||||
int stm32_adc_setup(void);
|
||||
#endif
|
||||
|
||||
#endif /* __BOARDS_ARM_B_L072Z_LRWAN1_SRC_B_L072Z_LRWAN1_H */
|
||||
@@ -0,0 +1,145 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_adc.c
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/analog/adc.h>
|
||||
|
||||
#include "stm32.h"
|
||||
|
||||
#if defined(CONFIG_ADC) && defined(CONFIG_STM32F0L0G0_ADC1)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* The number of ADC channels in the conversion list */
|
||||
|
||||
#define ADC1_NCHANNELS 2
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* Identifying number of each ADC channel (even if NCHANNELS is less ) */
|
||||
|
||||
static const uint8_t g_chanlist1[2] =
|
||||
{
|
||||
0,
|
||||
4,
|
||||
};
|
||||
|
||||
/* Configurations of pins used by each ADC channel */
|
||||
|
||||
static const uint32_t g_pinlist1[2] =
|
||||
{
|
||||
GPIO_ADC1_IN0, /* PA0/A0 */
|
||||
GPIO_ADC1_IN4 /* PA4/A2 */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_adc_setup
|
||||
*
|
||||
* Description:
|
||||
* Initialize ADC and register the ADC driver.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_adc_setup(void)
|
||||
{
|
||||
static bool initialized = false;
|
||||
FAR struct adc_dev_s *adc;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
/* Check if we have already initialized */
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
/* Configure the pins as analog inputs for the selected channels */
|
||||
|
||||
for (i = 0; i < ADC1_NCHANNELS; i++)
|
||||
{
|
||||
stm32_configgpio(g_pinlist1[i]);
|
||||
}
|
||||
|
||||
/* Call stm32_adcinitialize() to get an instance of the ADC interface */
|
||||
|
||||
adc = stm32_adcinitialize(1, g_chanlist1, ADC1_NCHANNELS);
|
||||
if (adc == NULL)
|
||||
{
|
||||
aerr("ERROR: Failed to get ADC interface 1\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Register the ADC driver at "/dev/adc0" */
|
||||
|
||||
ret = adc_register("/dev/adc0", adc);
|
||||
if (ret < 0)
|
||||
{
|
||||
aerr("ERROR: adc_register /dev/adc0 failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ADC && CONFIG_STM32F0L0G0_ADC1 */
|
||||
@@ -0,0 +1,94 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_appinitialize.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/leds/userled.h>
|
||||
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initalization logic and the
|
||||
* matching application logic. The value cold be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return stm32_bringup();
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_autoleds.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "stm32_gpio.h"
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_initialize(void)
|
||||
{
|
||||
/* Configure LED1 GPIO for output */
|
||||
|
||||
stm32_configgpio(GPIO_LED1);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_on
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_on(int led)
|
||||
{
|
||||
if (led == BOARD_LED1)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LED1, true);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_off
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_off(int led)
|
||||
{
|
||||
if (led == BOARD_LED1)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LED1, false);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LEDS */
|
||||
@@ -0,0 +1,116 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_boot.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following entry point. This
|
||||
* entry point is called early in the intitialization -- after all memory
|
||||
* has been configured and mapped but before any devices have been
|
||||
* initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void stm32_boardinitialize(void)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
/* Configure on-board LEDs if LED support has been selected. */
|
||||
|
||||
board_autoled_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI
|
||||
/* Configure SPI chip selects */
|
||||
|
||||
stm32_spidev_initialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_late_initialize
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional initialization call
|
||||
* will be performed in the boot-up sequence to a function called
|
||||
* board_late_initialize(). board_late_initialize() will be called immediately after
|
||||
* up_initialize() is called and just before the initial application is started.
|
||||
* This additional initialization phase may be used, for example, to initialize
|
||||
* board-specific device drivers.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)
|
||||
/* Perform board bring-up here instead of from the board_app_initialize(). */
|
||||
|
||||
(void)stm32_bringup();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,189 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_bringup.c
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/leds/userled.h>
|
||||
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#undef HAVE_LEDS
|
||||
#undef HAVE_DAC
|
||||
|
||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||
# define HAVE_LEDS 1
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DAC)
|
||||
# define HAVE_DAC1 1
|
||||
# define HAVE_DAC2 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_i2c_register
|
||||
*
|
||||
* Description:
|
||||
* Register one I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL)
|
||||
static void stm32_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = stm32_i2cbus_initialize(bus);
|
||||
if (i2c == NULL)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = i2c_register(i2c, bus);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
|
||||
bus, ret);
|
||||
stm32_i2cbus_uninitialize(i2c);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_i2ctool
|
||||
*
|
||||
* Description:
|
||||
* Register I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL)
|
||||
static void stm32_i2ctool(void)
|
||||
{
|
||||
#ifdef CONFIG_STM32F0L0G0_I2C1
|
||||
stm32_i2c_register(1);
|
||||
#endif
|
||||
#ifdef CONFIG_STM32F0L0G0_I2C2
|
||||
stm32_i2c_register(2);
|
||||
#endif
|
||||
#ifdef CONFIG_STM32F0L0G0_I2C3
|
||||
stm32_i2c_register(3);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y && CONFIG_NSH_ARCHINIT:
|
||||
* Called from the NSH library
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_bringup(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_LEDS
|
||||
/* Register the LED driver */
|
||||
|
||||
ret = userled_lower_initialize(LED_DRIVER_PATH);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ADC
|
||||
/* Initialize ADC and register the ADC driver. */
|
||||
|
||||
ret = stm32_adc_setup();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DAC
|
||||
/* Initialize DAC and register the DAC driver. */
|
||||
|
||||
ret = stm32_dac_setup();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPWAN_SX127X
|
||||
ret = stm32_lpwaninitialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize wireless driver: %d\n", ret);
|
||||
}
|
||||
#endif /* CONFIG_LPWAN_SX127X */
|
||||
|
||||
UNUSED(ret);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_spi.c
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "chip.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm32_spi.h"
|
||||
|
||||
#include "b-l072z-lrwan1.h"
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the Nucleo-144 board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
void stm32_spidev_initialize(void)
|
||||
{
|
||||
/* NOTE: Clocking for SPI1 and/or SPI2 was already provided in stm32_rcc.c.
|
||||
* Configurations of SPI pins is performed in stm32_spi.c.
|
||||
* Here, we only initialize chip select pins unique to the board
|
||||
* architecture.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI1
|
||||
# ifdef CONFIG_LPWAN_SX127X
|
||||
/* Configure the SPI-based SX127X chip select GPIO */
|
||||
|
||||
spiinfo("Configure GPIO for SX127X SPI1/CS\n");
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_CS);
|
||||
stm32_gpiowrite(GPIO_SX127X_CS, true);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_spi1/2/select and stm32_spi1/2/status
|
||||
*
|
||||
* Description:
|
||||
* The external functions, stm32_spi1/2select and stm32_spi1/2status
|
||||
* must be provided by board-specific logic. They are implementations of
|
||||
* the select and status methods of the SPI interface defined by struct
|
||||
* spi_ops_s (see include/nuttx/spi/spi.h). All other methods (including
|
||||
* stm32_spibus_initialize()) are provided by common STM32 logic. To use this
|
||||
* common SPI logic on your board:
|
||||
*
|
||||
* 1. Provide logic in stm32_boardinitialize() to configure SPI chip select
|
||||
* pins.
|
||||
* 2. Provide stm32_spi1/2select() and stm32_spi1/2status() functions
|
||||
* in your board-specific logic. These functions will perform chip
|
||||
* selection and status operations using GPIOs in the way your board is
|
||||
* configured.
|
||||
* 3. Add a calls to stm32_spibus_initialize() in your low level application
|
||||
* initialization logic
|
||||
* 4. The handle returned by stm32_spibus_initialize() may then be used to bind
|
||||
* the SPI driver to higher level logic (e.g., calling
|
||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||
* the SPI MMC/SD driver).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI1
|
||||
void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
|
||||
switch (devid)
|
||||
{
|
||||
#ifdef CONFIG_LPWAN_SX127X
|
||||
case SPIDEV_LPWAN(0):
|
||||
{
|
||||
spiinfo("SX127X device %s\n", selected ? "asserted" : "de-asserted");
|
||||
|
||||
/* Set the GPIO low to select and high to de-select */
|
||||
|
||||
stm32_gpiowrite(GPIO_SX127X_CS, !selected);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t status = 0;
|
||||
|
||||
switch (devid)
|
||||
{
|
||||
#ifdef CONFIG_LPWAN_SX127X
|
||||
case SPIDEV_LPWAN(0):
|
||||
{
|
||||
status |= SPI_STATUS_PRESENT;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif /* CONFIG_STM32F0L0G0_SPI1 */
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_SPI2
|
||||
void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
}
|
||||
|
||||
uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_STM32F0L0G0_SPI2 */
|
||||
|
||||
#endif /* CONFIG_STM32F0L0G0_SPI */
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/****************************************************************************
|
||||
* config/b-l072z-lrwan1/src/stm32_ssd1306.c
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/ssd1306.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#include "stm32.h"
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_LCD_MAXPOWER
|
||||
# define CONFIG_LCD_MAXPOWER 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct i2c_master_s *g_i2c;
|
||||
FAR struct lcd_dev_s *g_lcddev;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_lcd_initialize
|
||||
****************************************************************************/
|
||||
|
||||
int board_lcd_initialize(void)
|
||||
{
|
||||
/* Initialize I2C */
|
||||
|
||||
g_i2c = stm32_i2cbus_initialize(OLED_I2C_PORT);
|
||||
if (!g_i2c)
|
||||
{
|
||||
lcderr("ERROR: Failed to initialize I2C port %d\n", OLED_I2C_PORT);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_lcd_getdev
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct lcd_dev_s *board_lcd_getdev(int devno)
|
||||
{
|
||||
/* Bind the I2C port to the OLED */
|
||||
|
||||
g_lcddev = ssd1306_initialize(g_i2c, NULL, devno);
|
||||
if (!g_lcddev)
|
||||
{
|
||||
lcderr("ERROR: Failed to bind I2C port 1 to OLED %d: %d\n", devno);
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdinfo("Bound I2C port %d to OLED %d\n", OLED_I2C_PORT, devno);
|
||||
|
||||
/* And turn the OLED on */
|
||||
|
||||
(void)g_lcddev->setpower(g_lcddev, CONFIG_LCD_MAXPOWER);
|
||||
return g_lcddev;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_lcd_uninitialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_lcd_uninitialize(void)
|
||||
{
|
||||
/* TO-FIX */
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
/****************************************************************************
|
||||
* boards/b-l072z-lrwan1/src/stm32_boot.c
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Authors: Mateusz Szafoni <raiden00@railab.me>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
#include <nuttx/wireless/lpwan/sx127x.h>
|
||||
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm32_exti.h"
|
||||
#include "stm32_spi.h"
|
||||
|
||||
#include "b-l072z-lrwan1.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* SX127X on SPI1 bus */
|
||||
|
||||
#define SX127X_SPI 1
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static void sx127x_chip_reset(void);
|
||||
static int sx127x_opmode_change(int opmode);
|
||||
static int sx127x_freq_select(uint32_t freq);
|
||||
static int sx127x_pa_select(bool enable);
|
||||
static int sx127x_irq0_attach(xcpt_t isr, FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
struct sx127x_lower_s lower =
|
||||
{
|
||||
.irq0attach = sx127x_irq0_attach,
|
||||
.reset = sx127x_chip_reset,
|
||||
.opmode_change = sx127x_opmode_change,
|
||||
.freq_select = sx127x_freq_select,
|
||||
.pa_select = sx127x_pa_select,
|
||||
.pa_force = false
|
||||
};
|
||||
|
||||
static bool g_high_power_output = false;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sx127x_irq0_attach
|
||||
****************************************************************************/
|
||||
|
||||
static int sx127x_irq0_attach(xcpt_t isr, FAR void *arg)
|
||||
{
|
||||
wlinfo("Attach DIO0 IRQ\n");
|
||||
|
||||
/* IRQ on rising edge */
|
||||
|
||||
(void)stm32_gpiosetevent(GPIO_SX127X_DIO0, true, false, false, isr, arg);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sx127x_chip_reset
|
||||
****************************************************************************/
|
||||
|
||||
static void sx127x_chip_reset(void)
|
||||
{
|
||||
wlinfo("SX127X RESET\n");
|
||||
|
||||
/* Configure reset as output */
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_RESET | GPIO_OUTPUT | GPIO_SPEED_HIGH |
|
||||
GPIO_OUTPUT_CLEAR);
|
||||
|
||||
/* Set pin to zero */
|
||||
|
||||
stm32_gpiowrite(GPIO_SX127X_RESET, false);
|
||||
|
||||
/* Wait 1 ms */
|
||||
|
||||
usleep(1000);
|
||||
|
||||
/* Configure reset as input */
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_RESET | GPIO_INPUT | GPIO_FLOAT);
|
||||
|
||||
/* Wait 10 ms */
|
||||
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sx127x_opmode_change
|
||||
****************************************************************************/
|
||||
|
||||
static int sx127x_opmode_change(int opmode)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
/* Configure antena switch outputs in SLEEP mode */
|
||||
|
||||
if (opmode == SX127X_OPMODE_SLEEP)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF1, false);
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF2, false);
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF3, false);
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_CRF1 | GPIO_ANALOG);
|
||||
stm32_configgpio(GPIO_SX127X_CRF2 | GPIO_ANALOG);
|
||||
stm32_configgpio(GPIO_SX127X_CRF3 | GPIO_ANALOG);
|
||||
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* Configure antena switch outputs */
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_CRF1 | GPIO_OUTPUT | GPIO_OUTPUT_CLEAR);
|
||||
stm32_configgpio(GPIO_SX127X_CRF2 | GPIO_OUTPUT | GPIO_OUTPUT_CLEAR);
|
||||
stm32_configgpio(GPIO_SX127X_CRF3 | GPIO_OUTPUT | GPIO_OUTPUT_CLEAR);
|
||||
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF1, false);
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF2, false);
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF3, false);
|
||||
|
||||
switch (opmode)
|
||||
{
|
||||
case SX127X_OPMODE_STANDBY:
|
||||
case SX127X_OPMODE_FSRX:
|
||||
case SX127X_OPMODE_FSTX:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case SX127X_OPMODE_TX:
|
||||
{
|
||||
/* Set TX RFO or TX BOOST */
|
||||
|
||||
if (g_high_power_output == true)
|
||||
{
|
||||
wlinfo("SET CRF3\n");
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
wlinfo("SET CRF2\n");
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF2, true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SX127X_OPMODE_RX:
|
||||
case SX127X_OPMODE_RXSINGLE:
|
||||
case SX127X_OPMODE_CAD:
|
||||
{
|
||||
/* Set antena RX */
|
||||
|
||||
wlinfo("SET CRF1\n");
|
||||
stm32_gpiowrite(GPIO_SX127X_CRF1, true);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
wlerr("ERROR: invalid mode %d\n", opmode);
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sx127x_freq_select
|
||||
****************************************************************************/
|
||||
|
||||
static int sx127x_freq_select(uint32_t freq)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
/* Only HF supported (BAND3 - 860-930 MHz) */
|
||||
|
||||
if (freq < SX127X_HFBAND_THR)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
wlerr("LF band not supported\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sx127x_pa_select
|
||||
****************************************************************************/
|
||||
|
||||
static int sx127x_pa_select(bool enable)
|
||||
{
|
||||
g_high_power_output = enable;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_lpwaninitialize(void)
|
||||
{
|
||||
FAR struct spi_dev_s *spidev;
|
||||
int ret = OK;
|
||||
|
||||
wlinfo("Register the sx127x module\n");
|
||||
|
||||
/* Setup DIO0 */
|
||||
|
||||
stm32_configgpio(GPIO_SX127X_DIO0);
|
||||
|
||||
/* Init SPI bus */
|
||||
|
||||
spidev = stm32_spibus_initialize(SX127X_SPI);
|
||||
if (!spidev)
|
||||
{
|
||||
wlerr("ERROR: Failed to initialize SPI %d bus\n", SX127X_SPI);
|
||||
ret = -ENODEV;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* Initialize SX127X */
|
||||
|
||||
ret = sx127x_register(spidev, &lower);
|
||||
if (ret < 0)
|
||||
{
|
||||
wlerr("ERROR: Failed to register sx127x\n");
|
||||
goto errout;
|
||||
}
|
||||
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user