FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


mn-hooks

This is an old revision of the document!


Using hooks on Manage/Mn:

dio.h has macros defined: DEBUG_H0(x), DEBUG_H1(x) and DEBUG_H2(x) (the number will vary based on your hardware). x = 1 for a high pin (+3V3), and 0 for a low (GND) pin. Here's an example of a hook used to measure the execution time of user functions:

//Case 4: User Functions
void mainFSM4(void)
{
	DEBUG_H0(1);
 
	#if(RUNTIME_FSM1 == ENABLED)
	user_fsm_1();
	#endif //RUNTIME_FSM1 == ENABLED
 
	DEBUG_H0(0);
}

Always start with a Search In Files/Project to make sure that your hooks are not already active!

mn-hooks.1576781855.txt.gz · Last modified: 2019/12/19 18:57 by jfduval