본문 바로가기
인공지능

main() for Micro Controller

by YJHTPII 2020. 11. 12.
반응형
// Expose a C friendly interface for main functions.
#ifdef __cplusplus
extern "C" {
#endif
 
// Initializes all data needed for the example. The name is important, and needs
// to be setup() for Arduino compatibility.
void setup();
 
// Runs one iteration of data gathering and inference. This should be called
// repeatedly from the application code. The name needs to be loop() for Arduino
// compatibility.
void loop();
 
#ifdef __cplusplus
}
#endif

 

 
 
// This is the default main used on systems that have the standard C entry
// point. Other devices (for example FreeRTOS or ESP32) that have different
// requirements for entry code (like an app_main function) should specialize
// this main.cc file in a target-specific subfolder.
int main(int argc, char* argv[]) {
setup();
while (true) {
loop();
}
}
반응형

댓글