generated from TDD-Templates/cmake_cpputest_template_avr
changed paramaters and names.
This commit is contained in:
parent
355b7eea87
commit
5b2ce9f4d8
|
@ -115,7 +115,7 @@ uint16_t ReadADC(void);
|
||||||
* @brief Reads the ADC pin
|
* @brief Reads the ADC pin
|
||||||
* @param
|
* @param
|
||||||
*/
|
*/
|
||||||
void FaderMoveTo(uint8_t pos);
|
void MotorMoveTo(uint8_t pos);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
@ -127,7 +127,7 @@ void MotorCoast(void);
|
||||||
* @brief
|
* @brief
|
||||||
* @param
|
* @param
|
||||||
*/
|
*/
|
||||||
void MotorMove(int direction);
|
void MotorMove(uint8_t fwd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
|
|
16
src/main.c
16
src/main.c
|
@ -31,6 +31,8 @@ volatile uint8_t idx;
|
||||||
|
|
||||||
volatile uint16_t tick_count;
|
volatile uint16_t tick_count;
|
||||||
|
|
||||||
|
volatile uint8_t fader_pos1;
|
||||||
|
|
||||||
// #############################
|
// #############################
|
||||||
// Prototypes
|
// Prototypes
|
||||||
// #############################
|
// #############################
|
||||||
|
@ -135,6 +137,19 @@ uint16_t ReadADC(void) {
|
||||||
* ############################
|
* ############################
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
void MotorMoveTo(uint8_t pos)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Using the compatable bool type.
|
||||||
|
void MotorMove(uint8_t fwd)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void MotorCoast(void) {
|
void MotorCoast(void) {
|
||||||
PORTB &= ~((1 << PWM_PIN1) | (1 << PWM_PIN2)); // Disable motor drive
|
PORTB &= ~((1 << PWM_PIN1) | (1 << PWM_PIN2)); // Disable motor drive
|
||||||
}
|
}
|
||||||
|
@ -213,6 +228,7 @@ static void UpdateButtonOutput(btn_state *b) {
|
||||||
if (!b->is_long_pressed && !b->timer_enabled) {
|
if (!b->is_long_pressed && !b->timer_enabled) {
|
||||||
/*Then start the timer and update the output*/
|
/*Then start the timer and update the output*/
|
||||||
ToggleOutput(b);
|
ToggleOutput(b);
|
||||||
|
FaderMoveTo(fader_pos1);
|
||||||
StartButtonTimer(b);
|
StartButtonTimer(b);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue