1 Bit Manipulation



SysTick->CTRL |= 1 << 1;
SysTick->CTRL |= 0X0002;
SysTick->CTRL &= ~(1 << 0); /* Disable SYSTICK */
SysTick->CTRL &= 0XFFFFFFFE; /* Disable SYSTICK */
GPIOB->ODR ^= 1 << 5;
2 Define Macro Definitions


3 Ifdef Conditional Compilation
#ifdef Identifier Program Segment 1#else Program Segment 2#endif
#ifdef Program Segment 1 #endif
#if !defined (HSE_VALUE) #define HSE_VALUE 24000000U #endif
4 Extern Variable Declaration
extern uint16_t g_usart_rx_sta;
uint16_t g_usart_rx_sta;
5 Typedef Type Alias
struct _GPIO { __IO uint32_t CRL; __IO uint32_t CRH; … };
struct _GPIO gpiox; /* Define structure variable gpiox */
typedef struct { __IO uint32_t CRL; __IO uint32_t CRH; … } GPIO_TypeDef;
GPIO_TypeDef gpiox;
More exciting content:
Yan Shi│Reflections and Suggestions on the “Dilemma” of Young Teachers in Universities
Academician Zheng Weimin: Why Computer Majors Have Become Popular Among Candidates
【Directory】”Computer Education” Issue 7, 2022
【Directory】”Computer Education” Issue 6, 2022
【Directory】”Computer Education” Issue 5, 2022
【Directory】”Computer Education” Issue 4, 2022
【Directory】”Computer Education” Issue 3, 2022
【Directory】”Computer Education” Issue 2, 2022
【Directory】”Computer Education” Issue 1, 2022
【Editorial Board Message】Professor Li Xiaoming from Peking University: Thoughts from the “Year of Classroom Teaching Improvement”…
Professor Chen Daoxu from Nanjing University: Which is more important, teaching students to ask questions or teaching students to answer questions?
【Yan Shi Series】: Trends in Computer Science Development and Their Impact on Computer Education
Professor Li Xiaoming from Peking University: From Interesting Mathematics to Interesting Algorithms to Interesting Programming—A Path for Non-Majors to Experience Computational Thinking?
Reflections on Several Issues in Building First-Class Computer Disciplines
Professor Zhan Dechen from Harbin Institute of Technology Answers 2000 Questions About AI
Professor Zhou Aoying, Vice President of East China Normal University: Accelerating the Advancement of Computer Science Education—An Interview with…
New Engineering and Big Data Professional Construction
Learning from Others—Compilation of Research Articles on Computer Education at Home and Abroad