Advertisement
romaincayre

Untitled

Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include <IRremote.h>
  2. /*DEFINE(Raw,0x0)
  3. DEFINE(NEC,0x1)
  4. */
  5.  
  6. typedef struct EtatFirmware {
  7. char current_proto = 0x0;
  8. unsigned int raw = {};
  9. unsigned int current_freq = 38; // (38kHz)
  10. unsigned int current_code = 0;
  11. } EtatFirmware;
  12.  
  13. EtatFirmware etatcourant;
  14.  
  15. void reset() {
  16. etatcourant.current_proto = 0x0;
  17. etatcourant.raw = {};
  18. etatcourant.current_freq = 38;
  19. etatcourant.current_code = 0;
  20. }
  21.  
  22. void setup() {
  23. Serial.begin(115200);
  24. reset();
  25. }
  26. void send(char proto,char *datas) {
  27.  
  28. }
  29.  
  30. void setFrequency(int khz){
  31. etatcourant.current_freq = khz;
  32. }
  33.  
  34. unsigned int getFrequency(){
  35. return etatcourant.current_freq;
  36. }
  37.  
  38. void loop() {
  39. // put your main code here, to run repeatedly:
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement