// Initialize the keys about pressure add and subtract
PIO_SetInput(1 << PRESSURE_ADD_KEY, 1, 0);
PIO_SetInput(1 << PRESSURE_SUB_KEY, 1, 0);
PIO_SetInput(1 << PRESSURE_LEVEL1_KEY, 1, 0);
PIO_SetInput(1 << PRESSURE_LEVEL2_KEY, 1, 0);
PIO_SetInput(1 << PRESSURE_LEVEL3_KEY, 1, 0);
PIO_SetInput(1 << PRESSURE_LEVEL4_KEY, 1, 0);
// Intialize the LEDs about pressure add and subtract
PIO_SetOutput(1 << PRESSURE_ADD_LED, 1, 0, GPIO_PULLUP);
PIO_SetOutput(1 << PRESSURE_SUB_LED, 1, 0, GPIO_PULLUP);
// Initialize the varialbe for pressure
Pressure_Ka = 0.0; // determined by test
Pressure_Kb = 0.0; // determined by test
Pressure_Value = 0.0;
// Initialize press add and subtract processing variables
Press_SubInput = FALSE;
SubProcess_Flag = FALSE;
SubProcess_Value = 0.0;
SubProcess_Timer = 0; |