/*! * you should be define it in your main thread loop and register it to your decouple library */ intmain() { PublicApi_t interface; publicInterfaceInit(&interface); interfaceRegister(&interface); }
Library
1 2 3 4 5 6 7 8 9 10 11 12 13
/*! * in your library you should instantiate it */ PublicApi_t *interfaceReg; /************************************************************************************************** @brief void interfaceRegister(PublicApi_t *interface_ptr) @param[in] none @return none **************************************************************************************************/ voidinterfaceRegister(PublicApi_t *interface_ptr) { interfaceReg = interface_ptr; }
IF you want to register configuration to platform, and the following method can be use
if(stack_usage > 0.8) { // TODO } /* The stack sentinel is placed at the far end of the stack, so if the stack grows beyond its bounds, the sentinel value will be overwritten. */ if(stack_ptr[0]!=STACK_GUARD_VALUE) { //TOD: stack overflow } }
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.