FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


mn-hooks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mn-hooks [2018/03/02 21:35] (current)
jfduval created
Line 1: Line 1:
 +====== 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:
 +
 +<code c>
 +//Case 4: User Functions
 +void mainFSM4(void)
 +{
 + DEBUG_H0(1);​
 +
 + #​if(RUNTIME_FSM1 == ENABLED)
 + user_fsm_1();​
 + #endif //​RUNTIME_FSM1 == ENABLED
 +
 + DEBUG_H0(0);​
 +}
 +</​code>​
  
mn-hooks.txt ยท Last modified: 2018/03/02 21:35 by jfduval