STM32 learning record 16 ucosii+UCGUI

Publisher:码字奇才Latest update time:2016-08-28 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Mainly introduce the modifications of UCGUI:
1: GUI_X_ucos.c folder, line 80, modified to:
/*
*********************************************************************************************************
*                                          GUI_X_ExecIdle()
*********************************************************************************************************
*/
void GUI_X_ExecIdle (void) 
{
//    OS_X_Delay(1);
    OSTimeDly(50);//Modified by myself
}
2: Finally add the following function to GUI_X_ucos.c, which is copied from the GUI_X.c file. You do not need to add GUI_X to the project.
//The following is copied from GUI_X
/*********************************************************************
*
*      Logging: OS dependent
 
Note:
  Logging is used in higher debug levels only. The typical target
  build does not use logging and does therefor not require any of
  the logging routines below. For a release build without logging
  the routines below may be eliminated to save some space.
  (If the linker is not function aware and eliminates unreferenced
  functions automatically)
 
*/
 
void GUI_X_Log     (const char *s) { GUI_USE_PARA(s); }
void GUI_X_Warn    (const char *s) { GUI_USE_PARA(s); }
void GUI_X_ErrorOut(const char *s) { GUI_USE_PARA(s); }
 
The screenshot of the project file is as follows:
STM32 learning record 16 ucosii+UCGUI - zmurder - Qidian Electronic Studio
Keywords:STM32 Reference address:STM32 learning record 16 ucosii+UCGUI

Previous article:STM32 Learning Record 18 IAP (2)
Next article:STM32 learning record 15 ucosii message queue

Recommended ReadingLatest update time:2024-11-15 15:02

Allocation of FLASH space in STM32 microcontroller bootloader
According to the program running process: Normal program startup process: when starting from FLASH, first enter from the physical address entry 0x08000000 of the flash memory, then the reset interrupt jumps to the reset interrupt service routine; after the reset interrupt service routine is executed, it jumps to the m
[Microcontroller]
How to write STM32 UART2 interrupt function
void USART2_IRQHandler(void) {  uchar tmp;  //接收中断  if(USART_GetITStatus(USART2,USART_IT_RXNE)==SET)  // 接收 中断  {   USART_ClearITPendingBit(USART2,USART_IT_RXNE); // U1RX_Clear_Intr_Status_Bit;   tmp=USART_ReceiveData(USART2);   }  //USART_IT_TXE // 发送中断  if( USART_GetITStatus(USART2, USART_IT_TXE) == SET  ) //一个是TXE=
[Microcontroller]
STM32 generates 7 PWM waves
The two advanced timers TIM1 and TIM8 in the STM32 timer can generate 7 PWM waves because they have 7 pin channels respectively:  Channel 1  TIM1_CH1  PA8  Channel 1  TIM1_CH1N  PB13  Channel 2  TIM1_CH2  PA9  Channel 2  TIM1_CH2N  PB14  Channel 3  TIM1_CH3  PA10
[Microcontroller]
stm32 SPI-FLASH W25Q64
W25Q64 SPI Configuration Steps 1. Enable SPI clock 2. Enable GPIO port clock 3. Initialize GPIO and configure pin mode 4. Initialize SPI 5. Enable SPI 6. SPI read and write data 7. Check SPI transmission status Example typedef struct { uint16_t SPI_Direction; uint16_t SPI_Mode;  uint16_t SPI
[Microcontroller]
stm32 SPI-FLASH W25Q64
STM32 RCC
STM32 RCC reset and clock configuration, I will ignore the reset first, learn the clock configuration first, and then learn it after the reset.   STM32 has multiple clock sources, namely   HSI: Start by default when powered on. Do not use it for now because of its low accuracy. You can use it later if needed.
[Microcontroller]
STM32 RCC
stm32 notes: key input (simplified version)
C Code   //GPIOA8 is LED0   //GPIOA13 is KEY0 only contains startup code STM32F10x.s      #define GPIOA_CRL (*(volatile unsigned long *)(0x40000000+0x10000+0x0800+0x00))   #define GPIOA_CRH (*(volatile unsigned long *)(0x40000000+0x10000+0x0800+0x04))   #define GPIOA_IDR (*(volatile unsigned long *)(0x40000000
[Microcontroller]
stm32 notes: key input (simplified version)
STM32 learning: discussion on timer programming
Assume that timer 3 is used to time every 1 millisecond; the function saved to the SD card is StartSave(); Case 1: timer is fast, main loop is slow 1. Code design 1 (wrong design) view plain copy int cnt = 0; //Counting   //TIM3 interrupt handling function   void TIM3_IRQHandler(void)   {       if(TIM_GetITStatus(TIM
[Microcontroller]
STM32 SST25VF016B Driver
///** //  ****************************************************************************** //  * @file    stm32f10x_SST25VF016B.c  // * @brief SST25VF10B driver //  ****************************************************************************** //  * @ // * Interface definition (STM32 SPI1) // * CE--PA4 SO--P
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号