QueueHandle_t queueMsg = xQueueCreate(8, sizeof(char[128]));
void printTask(void *param_t){
char msg[128];
while(1){
if(xQueueReceive(queueMsg, &msg, portMAX_DELAY) == pdPASS){
Serial.println(msg);
}
}
}
void printmsg(String message){
char msg[128];
("-->"+message).toCharArray(msg,128);
xQueueSend(queueMsg,&msg,portMAX_DELAY);
}
void setup() {
Serial.begin(115200);
xTaskCreate(printTask, "PrintTask", 2048*4, NULL, 1, NULL);
printmsg("abab123付款就,./\@");//printmsg
}
void loop(){
}
Loading
esp32-s3-devkitc-1
esp32-s3-devkitc-1