FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


mn-hooks

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!

For reference, on rigid3.0, the physical pins corresponding to the hooks are located near the USB port, as shown in the image below.

mn-hooks.txt · Last modified: 2020/04/23 18:46 by rharris