A59 -V1.1版本提交
This commit is contained in:
68
main.c
68
main.c
@ -111,37 +111,34 @@ void vApplicationIRQHandler( void );
|
||||
#ifdef WIFI_SUPPORT
|
||||
static void wifi_reset(void)
|
||||
{
|
||||
gpio_direction_output(14, 1);
|
||||
mdelay(10);
|
||||
gpio_direction_output(14, 0);
|
||||
gpio_direction_output(BT_RESET_IO, 0);
|
||||
mdelay(20);
|
||||
gpio_direction_output(14, 1);
|
||||
gpio_direction_output(BT_RESET_IO, 1);
|
||||
mdelay(10);
|
||||
gpio_direction_output(WIFI_RESET_IO, 1);
|
||||
gpio_direction_output(WIFI_RESET_IO, 1);//WiFi复位
|
||||
gpio_direction_output(14, 1);//wifi-en
|
||||
gpio_direction_output(BT_RESET_IO, 0);//通话蓝牙复位
|
||||
mdelay(10);
|
||||
gpio_direction_output(WIFI_RESET_IO, 0);
|
||||
gpio_direction_output(14, 0);
|
||||
mdelay(20);
|
||||
gpio_direction_output(WIFI_RESET_IO, 1);
|
||||
mdelay(10);
|
||||
gpio_direction_output(14, 1);
|
||||
gpio_direction_output(BT_RESET_IO, 1);
|
||||
}
|
||||
#endif
|
||||
//A27ʹ<37>ܽ<EFBFBD>
|
||||
// #define CAT1_RESET_IO92 92 CAT1_EN cat1ʹ<31><CAB9>
|
||||
// #define CAT1_RESET_IO100 100 CAT1_RESET cat1<74><31>λ
|
||||
// #define CAT1_RESET_IO101 101 CAT_PWTKEY <09><>Դ
|
||||
// #define CAT1_RESET_IO47 47 UART_SW <09>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD>
|
||||
#define CAT1_EN_GPIO 92 //cat1ʹ<31><CAB9> <09>°汾<C2B0><E6B1BE>ʹ<EFBFBD>ܽ<EFBFBD>
|
||||
#define CAT1_RESET_GPIO 100 //cat1<74><31>λ <09>°汾100
|
||||
#define CAT_PWTKEY_GPIO 101 //<2F><>Դ <09>°汾101
|
||||
#define CAT1_UART_SW_GPIO 58 //<2F>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD> <09>°汾58
|
||||
#define BT2_CAT1_SW_GPIO 7 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>gpio<69><6F><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD>
|
||||
//A27ʹ<37>ܽ<EFBFBD>
|
||||
// #define CAT1_RESET_IO92 92 CAT1_EN cat1ʹ<31><CAB9>
|
||||
// #define CAT1_RESET_IO100 100 CAT1_RESET cat1<74><31>λ
|
||||
// #define CAT1_RESET_IO101 101 CAT_PWTKEY <09><>Դ
|
||||
// #define CAT1_RESET_IO47 47 UART_SW <09>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD>
|
||||
#define CAT1_EN_GPIO 92 //cat1ʹ<31><CAB9> <09>°汾<C2B0><E6B1BE>ʹ<EFBFBD>ܽ<EFBFBD>
|
||||
#define CAT1_RESET_GPIO 100 //cat1<74><31>λ <09>°汾100
|
||||
#define CAT_PWTKEY_GPIO 101 //<2F><>Դ <09>°汾101
|
||||
#define CAT1_UART_SW_GPIO 58 //<2F>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD> <09>°汾58
|
||||
#define BT2_CAT1_SW_GPIO 7 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>gpio<69><6F><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
/*********
|
||||
* gpio 92 CAT1_EN cat1ʹ<31><CAB9> <09>°汾<C2B0><E6B1BE>ʹ<EFBFBD>ܽ<EFBFBD>
|
||||
* gpio 100 CAT1_RESET cat1<74><31>λ <09>°汾100
|
||||
* gpio 101 CAT_PWTKEY <09><>Դ <09>°汾101
|
||||
* gpio 47 UART_SW <09>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD> <09>°汾58
|
||||
* gpio 92 CAT1_EN cat1ʹ<31><CAB9> <09>°汾<C2B0><E6B1BE>ʹ<EFBFBD>ܽ<EFBFBD>
|
||||
* gpio 100 CAT1_RESET cat1<74><31>λ <09>°汾100
|
||||
* gpio 101 CAT_PWTKEY <09><>Դ <09>°汾101
|
||||
* gpio 47 UART_SW <09>л<EFBFBD>cat1<74><31>bt2ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD> <09>°汾58
|
||||
* EC800M-CN
|
||||
*/
|
||||
void cat1_enable(void){
|
||||
@ -151,12 +148,12 @@ void cat1_enable(void){
|
||||
|
||||
static void CAT1_reset(void)
|
||||
{
|
||||
// gpio_direction_output(CAT1_RESET_IO92, 1);//ʹ<>ܽ<EFBFBD>
|
||||
// gpio_direction_output(CAT1_RESET_IO92, 1);//ʹ<>ܽ<EFBFBD>
|
||||
gpio_direction_output(CAT1_UART_SW_GPIO, 1);
|
||||
gpio_direction_output(CAT1_RESET_GPIO, 0);
|
||||
|
||||
gpio_direction_output(CAT_PWTKEY_GPIO, 0);
|
||||
gpio_direction_output(CAT1_UART_SW_GPIO, 0);//<2F><><EFBFBD><EFBFBD>bt2
|
||||
gpio_direction_output(CAT1_UART_SW_GPIO, 0);//<2F><><EFBFBD><EFBFBD>bt2
|
||||
// mdelay(100);
|
||||
// gpio_direction_output(CAT_PWTKEY_GPIO, 1);
|
||||
// mdelay(800);
|
||||
@ -166,7 +163,7 @@ static void CAT1_reset(void)
|
||||
#define CAT1_RESET_IO47 58//47
|
||||
#define BT2_RESET_IO48 7//48
|
||||
uint8_t gpio_state = 0;
|
||||
extern uint8_t complex_call;//uart.c<>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||
extern uint8_t complex_call;//uart.c<>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־
|
||||
extern void Set_sys_call_state(uint8_t value);
|
||||
extern void Set_sys_call_key_state(uint8_t value);
|
||||
extern void Set_sys_call_number(char *value);
|
||||
@ -184,7 +181,7 @@ static void gpio_bt2_handler(void *param)
|
||||
Set_sys_call_number(0);
|
||||
Set_sys_call_renumber(0);
|
||||
|
||||
// gpio_direction_output(CAT1_RESET_IO47, 0);//<2F><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ӧ<><D3A6>Ϊ1 <20><><EFBFBD><EFBFBD>cat1
|
||||
// gpio_direction_output(CAT1_RESET_IO47, 0);//<2F><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ӧ<><D3A6>Ϊ1 <20><><EFBFBD><EFBFBD>cat1
|
||||
}else{
|
||||
printf("gpio 47 >0 bt2\n");
|
||||
// gpio_direction_output(CAT1_RESET_IO47, 0);
|
||||
@ -351,6 +348,10 @@ static void prvSetupHardware( void )
|
||||
#else
|
||||
lcd_init();
|
||||
#endif
|
||||
pwm_config(2, 0,40000);
|
||||
pwm_config(3, 0,40000);
|
||||
pwm_disable(2);
|
||||
pwm_disable(3);
|
||||
#ifdef ADC_TOUCH
|
||||
TouchInit();
|
||||
#endif
|
||||
@ -364,17 +365,16 @@ static void prvSetupHardware( void )
|
||||
printf("MXC => Call Bt2 TRUE\r\n");
|
||||
BT2_reset();
|
||||
|
||||
gpio_direction_output(47, FALSE);
|
||||
|
||||
printf("MXC => CAT1 TRUE.\n");
|
||||
CAT1_reset();
|
||||
printf("MXC => light init TRUE.\n");
|
||||
light_gpio_init();
|
||||
|
||||
printf("MXC => moto adc init TRUE.\n");
|
||||
moto_adc_Init();
|
||||
|
||||
pwm_config(2, 24000,40000);//<2F><>Ļʹ<C4BB><CAB9>
|
||||
pwm_config(3, 24000,40000);//<2F>ƹ<EFBFBD>ʹ<EFBFBD><CAB9>
|
||||
//pwm_enable(2);
|
||||
//灯光全开
|
||||
light_gpio_init();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user