資源簡介
仿STM32 訪問外部SPI Flash程序,在ESP32中使用外部SPI Flash。 只有.c文件,懂得就夠了。后面還有其他版本
代碼片段和文件信息
/*?SPI?Master?example
???This?example?code?is?in?the?Public?Domain?(or?CC0?licensed?at?your?option.)
???Unless?required?by?applicable?law?or?agreed?to?in?writing?this
???software?is?distributed?on?an?“AS?IS“?BASIS?WITHOUT?WARRANTIES?OR
???CONDITIONS?OF?ANY?KIND?either?express?or?implied.
*/
#include?
#include?
#include?
#include?“freertos/FreeRTOS.h“
#include?“freertos/task.h“
#include?“esp_system.h“
#include?“esp_log.h“
#include?“driver/spi_master.h“
#include?“soc/gpio_struct.h“
#include?“driver/gpio.h“
#include?“l(fā)wip/def.h“
#include?“Proj1_SPI_Flash.h“
static?const?char?*TAG?=?“SPI_FLASH_MODE“;
/*
?This?code?displays?some?fancy?graphics?on?the?320x240?LCD?on?an?ESP-WROVER_KIT?board.
?This?example?demonstrates?the?use?of?both?spi_device_transmit?as?well?as
?spi_device_queue_trans/spi_device_get_trans_result?and?pre-transmit?callbacks.
?Some?info?about?the?ILI9341/ST7789V:?It?has?an?C/D?line?which?is?connected?to?a?GPIO?here.?It?expects?this
?line
評論
共有 條評論