First version of my operation system for stm32 board
Dependencies: RA8875 VS1053 sd-driver-hs
Diff: fce.h
- Revision:
- 0:86f82f777a7a
diff -r 000000000000 -r 86f82f777a7a fce.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fce.h Thu Mar 01 06:58:17 2018 +0000 @@ -0,0 +1,53 @@ +#include "variables.h" +/*********************************** + Keyboard split +***********************************/ +void kbsplit(char input[60]) +{ + int a = 0; + tmpE[a] = strtok(input, " "); + a++; + for (int i = 0; i <= 3; i++) + { + tmpE[a] = strtok(NULL, " "); + a++; + } +} + +/*********************************** + Compare +***********************************/ +int compare(char* input[2]) +{ + int tmpC =0; + int tmpB = 0; + tmpC = 0; + do + { + tmpB = strcasecmp(commands[tmpC], input[0]); + if (tmpB == 0) + { + break; + } + tmpC++; + } + while (tmpC < command_count); + return tmpC; +} + + +/*********************************** + Erase variable +***********************************/ + +void erase() +{ + + for (; tmpD < 499; tmpD++) + { + input[tmpD] = '\0'; + } + position = 0; + tmpD = 0; + +}