Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DEBUG_BUTTON_NB_SAMPLES 20
- #define DEBUG_BUTTON_NB_KEY 7
- // Each line correspond to the key ID, the first column is the most recent value
- uint16_t au16DebugButtonMeasure[7][DEBUG_BUTTON_NB_SAMPLES];
- uint16_t au16DebugButtonReference[7][DEBUG_BUTTON_NB_SAMPLES];
- void buts_debugShiftAdd(uint8_t u8KeyNb)
- {
- uint16_t *u16Local1DMes = (uint16_t *)au16DebugButtonMeasure[u8KeyNb];
- uint16_t *u16Local1DRef = (uint16_t *)au16DebugButtonReference[u8KeyNb];
- if (u8KeyNb < DEBUG_BUTTON_NB_KEY)
- {
- memmove(&u16Local1DMes[0], &u16Local1DMes[1], (DEBUG_BUTTON_NB_SAMPLES-1) * sizeof (*u16Local1DMes));
- memmove(&u16Local1DRef[0], &u16Local1DRef[1], (DEBUG_BUTTON_NB_SAMPLES-1) * sizeof (*u16Local1DRef));
- au16DebugButtonMeasure[u8KeyNb][DEBUG_BUTTON_NB_SAMPLES-1] = MyTKeys[u8KeyNb].p_ChD->Meas;
- au16DebugButtonReference[u8KeyNb][DEBUG_BUTTON_NB_SAMPLES-1] = MyTKeys[u8KeyNb].p_ChD->Ref;
- }
- else {} //this key does not exist
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement