The final project of Embedde class.

Committer:
pkr7098
Date:
Thu Jun 03 07:04:59 2021 +0000
Revision:
1:c51792ac72d6
Parent:
0:6489e982d4c9
The final project of Embedded class.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pkr7098 1:c51792ac72d6 1 #ifndef _ESP_CALL_H
pkr7098 1:c51792ac72d6 2 #define _ESP_CALL_H
pkr7098 1:c51792ac72d6 3
dshin 0:6489e982d4c9 4 // ======================================================================
dshin 0:6489e982d4c9 5
dshin 0:6489e982d4c9 6 typedef struct NodeMCU_PGM_STRUCT {
dshin 0:6489e982d4c9 7 const char *code; // NodeMCU code
dshin 0:6489e982d4c9 8 int delay; // delay time in 1/10 sec unit
dshin 0:6489e982d4c9 9 } NodeMCU_PGM;
dshin 0:6489e982d4c9 10
dshin 0:6489e982d4c9 11 // ======================================================================
dshin 0:6489e982d4c9 12
dshin 0:6489e982d4c9 13 extern RawSerial PC; // PC = (USBTX, USBRX)
dshin 0:6489e982d4c9 14 extern RawSerial ESP; // ESP = (D1=TX, D0=RX)
dshin 0:6489e982d4c9 15
dshin 0:6489e982d4c9 16 // ======================================================================
dshin 0:6489e982d4c9 17
dshin 0:6489e982d4c9 18 extern char ESP_recv_buffer[]; // ESP receive buffer
dshin 0:6489e982d4c9 19 extern int ESP_recv_buffer_index; // ESP receive buffer index
dshin 0:6489e982d4c9 20
dshin 0:6489e982d4c9 21 // ======================================================================
dshin 0:6489e982d4c9 22
dshin 0:6489e982d4c9 23 void ISR_PC_to_ESP();
dshin 0:6489e982d4c9 24 void ISR_ESP_to_PC();
dshin 0:6489e982d4c9 25
dshin 0:6489e982d4c9 26 void ISR_ESP_to_recv_buffer();
dshin 0:6489e982d4c9 27
dshin 0:6489e982d4c9 28 // ======================================================================
dshin 0:6489e982d4c9 29
dshin 0:6489e982d4c9 30 void ESP_reset(void);
dshin 0:6489e982d4c9 31
dshin 0:6489e982d4c9 32 void ESP_echo(void);
dshin 0:6489e982d4c9 33 void ESP_noecho(void);
dshin 0:6489e982d4c9 34
dshin 0:6489e982d4c9 35 char *ESP_call_single(NodeMCU_PGM pgm);
dshin 0:6489e982d4c9 36 void ESP_call_multi(NodeMCU_PGM pgms[]);
dshin 0:6489e982d4c9 37
pkr7098 1:c51792ac72d6 38 // ======================================================================
pkr7098 1:c51792ac72d6 39
pkr7098 1:c51792ac72d6 40 #endif