49 lines
1.4 KiB
C
49 lines
1.4 KiB
C
|
|
#ifndef __KT_H__
|
||
|
|
#define __KT_H__
|
||
|
|
|
||
|
|
#include "system/includes.h"
|
||
|
|
#include "kt_dbg.h"
|
||
|
|
|
||
|
|
//KT_LOG_INFO
|
||
|
|
#define _DBG_LEVEL_ KT_LOG_DEBUG
|
||
|
|
|
||
|
|
#define MODE_AUX_LP 0
|
||
|
|
#define MODE_BT_EMITTER 1
|
||
|
|
#define MODE_BT_RECEIVER 2
|
||
|
|
|
||
|
|
#define CFG_MODE_PIN IO_PORTB_03
|
||
|
|
#define CFG_MODE_AD_CH AD_CH_PB3
|
||
|
|
|
||
|
|
#define CFG_LP_MOT_PIN IO_PORTB_11
|
||
|
|
#define LP_MOT_ON() (gpio_set_output_value(CFG_LP_MOT_PIN,1))
|
||
|
|
#define LP_MOT_OFF() (gpio_set_output_value(CFG_LP_MOT_PIN,0))
|
||
|
|
|
||
|
|
#define CFG_MUTE_PIN IO_PORTB_05
|
||
|
|
#define PA_MUTE() (gpio_set_output_value(CFG_MUTE_PIN,0))
|
||
|
|
#define PA_UNMUTE() (gpio_set_output_value(CFG_MUTE_PIN,1))
|
||
|
|
|
||
|
|
#define CFG_PA_PWR_PIN IO_PORTB_04
|
||
|
|
#define PA_PWR_ON() (gpio_set_output_value(CFG_PA_PWR_PIN,1))
|
||
|
|
#define PA_PWR_OFF() (gpio_set_output_value(CFG_PA_PWR_PIN,0))
|
||
|
|
|
||
|
|
#define CFG_LED_RED_PIN IO_PORTA_06
|
||
|
|
#define LED_RED_ON() (gpio_set_output_value(CFG_LED_RED_PIN,1))
|
||
|
|
#define LED_RED_OFF() (gpio_set_output_value(CFG_LED_RED_PIN,0))
|
||
|
|
|
||
|
|
#define CFG_LED_BLUE_PIN IO_PORTA_07
|
||
|
|
#define LED_BLUE_ON() (gpio_set_output_value(CFG_LED_BLUE_PIN,1))
|
||
|
|
#define LED_BLUE_OFF() (gpio_set_output_value(CFG_LED_BLUE_PIN,0))
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
u8 kt_key_event_filter_after(int key_event);
|
||
|
|
|
||
|
|
u8 kt_get_mode(void);
|
||
|
|
void kt_boot_init(void);
|
||
|
|
void kt_init(void);
|
||
|
|
void kt_set_curr_mode(u8 mode);
|
||
|
|
u8 kt_get_curr_mode(void);
|
||
|
|
|
||
|
|
#endif
|