 
Good Sunday Morning #PineCone #BL602 @PINE64 ... And #BME280 on SPI! Yep this looks right 👍
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L49-L70
#BL602 SPI Data Transfer needs a "void *" parameter ... Which is cast to an "spi_ioc_transfer_t" ... That belongs to AliOS 😭
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L464-L502
Init #BL602 SPI Port ... No more traps!
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L42-L69
Another #BL602 trap! "vfs_spi_init_fullname" doesn't return the SPI Device ... It passes the SPI Device to AliOS! Let's create our own function to init the SPI Port without AliOS 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L504-L571
Nope #BL602 it's a trap! Should call "vfs_spi_init_fullname" to init the SPI port
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L504-L571
Init the #BL602 SPI Port ... Looks easy
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L41-L58
...But #BL602 SPI HAL doesn't implement all AliOS SPI Functions 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L368
#BL602 SPI Functions are the same as AliOS ... Time to practice my Chinese reading skills
https://help.aliyun.com/document_detail/161063.html?spm=a2c4g.11186623.6.576.391045c4bGoNKS
RF Explorer in #WandaVision? I got one too! 🙂
https://www.seeedstudio.com/RF-Explorer-Signal-Generator-COMBO-p-2944.html
But if AliOS is really a complete Embedded Operating System ... Why does #BL602 IoT SDK still need FreeRTOS? 🤔
20 years later ... I'm still Handling Interrupts 😉
https://www.yumpu.com/en/document/read/19235930/pc-choices-object-oriented-operating-system
"PC-Choices Object-oriented Operating System" ... Found my Master's Thesis from 1992! 🥲
https://www.yumpu.com/en/document/view/19235930/pc-choices-object-oriented-operating-system
#BL602 SPI DMA is used by AliOS VFS file system ... Which is bundled with the BL602 IoT SDK
https://pine64.github.io/bl602-docs/Components/Middleware/vfs/vfs.html
IoT Techie and Educator / Apache NuttX PMC