initialize ad9833 and mcp41
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#include "hw_button.h"
|
||||
#include "ctrl_channel_button.h"
|
||||
|
||||
#define DUMMY_GPIO_Port GPIOA
|
||||
#define DUMMY_GPIO_Pin GPIO_PIN_0
|
||||
#define DUMMY_GPIO_Port B1_GPIO_Port
|
||||
#define DUMMY_GPIO_Pin B1_Pin
|
||||
|
||||
static ButtonKey_t channel_buttons[BTN_CH_MAX];
|
||||
|
||||
@@ -11,39 +11,40 @@ void CTRL_channelButtonInit(void)
|
||||
{
|
||||
channel_buttons[BTN_CH_1].instance = BTN_CH_1;
|
||||
channel_buttons[BTN_CH_1].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_1].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_1].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_1].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_1].buttonLongPressed = CTRL_longPushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_1].gpio_port = BTN_CH1_GPIO_Port;
|
||||
channel_buttons[BTN_CH_1].gpio_pin = BTN_CH1_Pin;
|
||||
channel_buttons[BTN_CH_1].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
channel_buttons[BTN_CH_2].instance = BTN_CH_2;
|
||||
channel_buttons[BTN_CH_2].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_2].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_2].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_2].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_2].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
channel_buttons[BTN_CH_3].instance = BTN_CH_3;
|
||||
channel_buttons[BTN_CH_3].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_3].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_3].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_3].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_3].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
channel_buttons[BTN_CH_4].instance = BTN_CH_4;
|
||||
channel_buttons[BTN_CH_4].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_4].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_4].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_4].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_4].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
channel_buttons[BTN_CH_5].instance = BTN_CH_5;
|
||||
channel_buttons[BTN_CH_5].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_5].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_5].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_5].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_5].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
channel_buttons[BTN_CH_6].instance = BTN_CH_6;
|
||||
channel_buttons[BTN_CH_6].buttonPressed = CTRL_pushedChanBtnEvent;
|
||||
channel_buttons[BTN_CH_6].gpio_port = DUMMY_GPIO_Port;
|
||||
channel_buttons[BTN_CH_6].gpio_pin = DUMMY_GPIO_Pin;
|
||||
channel_buttons[BTN_CH_6].pushed_state = GPIO_PIN_SET;
|
||||
channel_buttons[BTN_CH_6].pushed_state = GPIO_PIN_RESET;
|
||||
|
||||
for (HW_chanBtnName_t btn_key = BTN_CH_1; btn_key < BTN_CH_MAX; btn_key++)
|
||||
{
|
||||
@@ -63,6 +64,11 @@ void CTRL_channelButtonsHandler(void)
|
||||
}
|
||||
|
||||
__weak void CTRL_pushedChanBtnEvent(ButtonKey_t *key)
|
||||
{
|
||||
UNUSED(key);
|
||||
}
|
||||
|
||||
__weak void CTRL_longPushedChanBtnEvent(ButtonKey_t *key)
|
||||
{
|
||||
UNUSED(key);
|
||||
}
|
||||
Reference in New Issue
Block a user