mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
37 lines
909 B
C
37 lines
909 B
C
/* Private includes -----------------------------------------------------------*/
|
|
//includes
|
|
#include "user_TasksInit.h"
|
|
#include "user_DataTask.h"
|
|
#include "main.h"
|
|
#include "adc.h"
|
|
#include "gate.h"
|
|
#include "usart.h"
|
|
/* Private typedef -----------------------------------------------------------*/
|
|
|
|
/* Private define ------------------------------------------------------------*/
|
|
|
|
|
|
/* Private variables ---------------------------------------------------------*/
|
|
|
|
/* Private function prototypes -----------------------------------------------*/
|
|
|
|
/**
|
|
* @brief task for data process and so on
|
|
* @param argument: Not used
|
|
* @retval None
|
|
*/
|
|
void DataTask(void *argument)
|
|
{
|
|
uint8_t keystr = 0;
|
|
uint16_t cur_bias = 4096 / 2;
|
|
while(1)
|
|
{
|
|
if(osMessageQueueGet(Key_MessageQueue, &keystr, NULL, 0)==osOK)
|
|
{
|
|
// UART6_TX_Send((uint8_t *)"key pressed\r\n", 13);
|
|
}
|
|
|
|
osDelay(1);
|
|
}
|
|
}
|