홍익인간 프로젝트/C 4

'break' statement when using curly braces in switch-caseAsked

42 4 I use curly braces with all of my switch case statements in C/Objective-C/C++ I had not, until a few moments ago, considered whether including the break; statement inside the braces was good or bad practice. I suspect that it doesn't matter, but I figure it is still worth asking. Just a give a slightly more detailed answer... The official C99 specification says the following about the break..

Solved: If you use the delay function delay_ms and delay_us of the atomic brother, there will be situations where the delay function cannot enter the delay function! ! !

First, explain that the delay function of the first atomic brother is no problem. Atomic brother's delay function is used in STM32F103, depending on the type of development board. Here are the delay functions of STM32F103 and STM32F030. (1) Used in STM32F030: #include "stm32f0xx.h" #include "delay.h" ////////////////////////////////////////////////////////////////////////////////// //This progra..

gettimeofday

차례1.1. 사용법1.2. 설명1.3. 반환값1.4. 에러1.5. 예제1.6. 참고문헌 현재 시간을 가져오고 시스템의 시간값을 설정한다. 1.1. 사용법 #include #include int gettimeofday(struct timeval *tv, struct timezone *tz); int settimeofday(const struct timeval *tv , const struct timezone *tz); 1.2. 설명 gettimeofday()은 time(2)와 매우 비슷하지만 마이크로초 단위의 시간 까지 되돌려준다. 현재는 time(2)를 대신해서 쓰이고 있으며, 가능한 time(2)대신 이 함수를 사용하는 걸 권장한다. 첫번째 인자인 tv는 현재 시스템 시간을 저장하기 위한 구조체로 다음..