mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
update valtage and current get
This commit is contained in:
@@ -29,8 +29,20 @@ void DataTask(void *argument)
|
||||
if(osMessageQueueGet(Key_MessageQueue, &keystr, NULL, 0)==osOK)
|
||||
{
|
||||
// UART6_TX_Send((uint8_t *)"key pressed\r\n", 13);
|
||||
|
||||
}
|
||||
|
||||
// __disable_irq();
|
||||
// if(adc_buf_index == 0)
|
||||
// memcpy((uint16_t*)adc_packet.data, (uint16_t*)ADC_BUF[1], sizeof(adc_packet.data));
|
||||
// else
|
||||
// memcpy((uint16_t*)adc_packet.data, (uint16_t*)ADC_BUF[0], sizeof(adc_packet.data));
|
||||
// __enable_irq();
|
||||
// adc_packet.header[0] = 0x55;
|
||||
// adc_packet.header[1] = 0xAA;
|
||||
// adc_packet.header[2] = ADC_TIMES;
|
||||
// adc_packet.header[3] = ADC_CHANELS;
|
||||
// adc_packet.header[4] = 0x10;
|
||||
// HAL_UART_Transmit_DMA(&huart6, (uint8_t *)&adc_packet, sizeof(adc_packet));
|
||||
osDelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,10 +54,8 @@ void HardwareInitTask(void *argument)
|
||||
|
||||
adc_packet.header[0] = 0x55;
|
||||
adc_packet.header[1] = 0xAA;
|
||||
adc_packet.header[2] = ADC_TIMES;
|
||||
adc_packet.header[3] = ADC_CHANELS;
|
||||
// 填充模式位
|
||||
adc_packet.header[4] = 0x10;
|
||||
adc_packet.header[2] = 0x03;
|
||||
|
||||
// gate, for current flow route selection, high current by default
|
||||
Gate_Port_Init();
|
||||
|
||||
Reference in New Issue
Block a user