![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Hackaday demo: Signal generator
Dependencies: SDFileSystem mbed
main.h@0:8baa10bd07de, 2015-09-11 (annotated)
- Committer:
- wd5gnr
- Date:
- Fri Sep 11 02:32:43 2015 +0000
- Revision:
- 0:8baa10bd07de
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wd5gnr | 0:8baa10bd07de | 1 | #ifndef __MAIN_H |
wd5gnr | 0:8baa10bd07de | 2 | #define __MAIN_H 1 |
wd5gnr | 0:8baa10bd07de | 3 | |
wd5gnr | 0:8baa10bd07de | 4 | |
wd5gnr | 0:8baa10bd07de | 5 | // If you don't have an SDCARD interface set to 0 |
wd5gnr | 0:8baa10bd07de | 6 | #define SDCARD 1 |
wd5gnr | 0:8baa10bd07de | 7 | // Adjust this for size of your board |
wd5gnr | 0:8baa10bd07de | 8 | #define BUFSIZE 16384 |
wd5gnr | 0:8baa10bd07de | 9 | #define BUFSIZEMASK 0x3FFF |
wd5gnr | 0:8baa10bd07de | 10 | |
wd5gnr | 0:8baa10bd07de | 11 | _EXTERN_ unsigned short buffer[BUFSIZE]; // Sample buffer |
wd5gnr | 0:8baa10bd07de | 12 | _EXTERN_ unsigned short bp; // pointer to same |
wd5gnr | 0:8baa10bd07de | 13 | |
wd5gnr | 0:8baa10bd07de | 14 | _EXTERN_ float timebaseus; |
wd5gnr | 0:8baa10bd07de | 15 | |
wd5gnr | 0:8baa10bd07de | 16 | |
wd5gnr | 0:8baa10bd07de | 17 | _EXTERN_ char ibuf[33]; // input token |
wd5gnr | 0:8baa10bd07de | 18 | |
wd5gnr | 0:8baa10bd07de | 19 | extern Serial pc; |
wd5gnr | 0:8baa10bd07de | 20 | |
wd5gnr | 0:8baa10bd07de | 21 | |
wd5gnr | 0:8baa10bd07de | 22 | int getachar(void); |
wd5gnr | 0:8baa10bd07de | 23 | int gettoken(int type=0); |
wd5gnr | 0:8baa10bd07de | 24 | int getnum(unsigned int *v, int type); |
wd5gnr | 0:8baa10bd07de | 25 | int getdec(unsigned int *v); |
wd5gnr | 0:8baa10bd07de | 26 | int gethex(unsigned int *v); |
wd5gnr | 0:8baa10bd07de | 27 | int getfloat(float *v); |
wd5gnr | 0:8baa10bd07de | 28 | void exec(void); |
wd5gnr | 0:8baa10bd07de | 29 | void exec0(void); |
wd5gnr | 0:8baa10bd07de | 30 | |
wd5gnr | 0:8baa10bd07de | 31 | #endif |