Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "main.h"
- /* Private includes ----------------------------------------------------------*/
- /* USER CODE BEGIN Includes */
- /* USER CODE END Includes */
- /* Private typedef -----------------------------------------------------------*/
- /* USER CODE BEGIN PTD */
- /* USER CODE END PTD */
- /* Private define ------------------------------------------------------------*/
- /* USER CODE BEGIN PD */
- /* USER CODE END PD */
- /* Private macro -------------------------------------------------------------*/
- /* USER CODE BEGIN PM */
- /* USER CODE END PM */
- /* Private variables ---------------------------------------------------------*/
- SPI_HandleTypeDef hspi1;
- SPI_HandleTypeDef hspi2;
- SPI_HandleTypeDef hspi3;
- SPI_HandleTypeDef hspi4;
- SPI_HandleTypeDef hspi5;
- SPI_HandleTypeDef hspi6;
- UART_HandleTypeDef huart3;
- /* USER CODE BEGIN PV */
- #include "lcd_config.h"
- #include "lcd_driver.h"
- lcd_entry_t lcd_devices[5];
- /* USER CODE END PV */
- /* Private function prototypes -----------------------------------------------*/
- void SystemClock_Config(void);
- static void MX_GPIO_Init(void);
- static void MX_USART3_UART_Init(void);
- static void MX_SPI2_Init(void);
- static void MX_SPI3_Init(void);
- static void MX_SPI1_Init(void);
- static void MX_SPI5_Init(void);
- static void MX_SPI6_Init(void);
- static void MX_SPI4_Init(void);
- /* USER CODE BEGIN PFP */
- /* USER CODE END PFP */
- /* Private user code ---------------------------------------------------------*/
- /* USER CODE BEGIN 0 */
- void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef * hspi)
- {
- HAL_UART_Transmit(&huart3,(uint8_t*)"TX\n",3,0xFFFF);
- }
- /* USER CODE END 0 */
- /**
- * @brief The application entry point.
- * @retval int
- */
- int main(void)
- {
- /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
- HAL_Init();
- /* Configure the system clock */
- SystemClock_Config();
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- MX_USART3_UART_Init();
- MX_SPI2_Init();
- MX_SPI3_Init();
- MX_SPI1_Init();
- MX_SPI5_Init();
- MX_SPI6_Init();
- MX_SPI4_Init();
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
- while (1)
- {
- HAL_SPI_Transmit_IT(&hspi1,lcd_devices[0].buffer1,16*1024);
- HAL_Delay(1000);
- /* USER CODE END WHILE */
- /* USER CODE BEGIN 3 */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement