SPC
Version 0.9.5
|
Constants, macros, and API functions for SPC. More...
#include "spmem.h"
Macros | |
#define | TRUE 1 |
#define | FALSE 0 |
#define | SERIAL_BUFFER_SIZE 255 |
#define | CHAR_BIT 32 |
#define | LONG_MIN -2147483648 |
#define | SCHAR_MIN -2147483648 |
#define | INT_MIN -2147483648 |
#define | CHAR_MIN -2147483648 |
#define | LONG_MAX 2147483647 |
#define | SCHAR_MAX 2147483647 |
#define | INT_MAX 2147483647 |
#define | CHAR_MAX 2147483647 |
#define | DAC_MODE_DCOUT 0 |
#define | DAC_MODE_SINEWAVE 1 |
#define | DAC_MODE_SQUAREWAVE 2 |
#define | DAC_MODE_SAWPOSWAVE 3 |
#define | DAC_MODE_SAWNEGWAVE 4 |
#define | DAC_MODE_TRIANGLEWAVE 5 |
#define | DAC_MODE_PWMVOLTAGE 6 |
#define | DAC_MODE_RESTART_MASK 0x80 |
#define | LED_BLUE 0x02 |
#define | LED_RED 0x01 |
#define | DIGI_PIN0 0x01 |
#define | DIGI_PIN1 0x02 |
#define | DIGI_PIN2 0x04 |
#define | DIGI_PIN3 0x08 |
#define | DIGI_PIN4 0x10 |
#define | DIGI_PIN5 0x20 |
#define | DIGI_PIN6 0x40 |
#define | DIGI_PIN7 0x80 |
#define | STROBE_S0 0x01 |
#define | STROBE_S1 0x02 |
#define | STROBE_S2 0x04 |
#define | STROBE_S3 0x08 |
#define | STROBE_READ 0x10 |
#define | STROBE_WRITE 0x20 |
#define | SLOT1 0 |
#define | SLOT2 1 |
#define | SLOT3 2 |
#define | SLOT4 3 |
#define | SLOT5 4 |
#define | SLOT6 5 |
#define | SLOT7 6 |
#define | LOG_STATUS_OPEN 2 |
#define | LOG_STATUS_BUSY 1 |
#define | LOG_STATUS_CLOSED 0 |
#define | MS_1 1 |
#define | MS_2 2 |
#define | MS_3 3 |
#define | MS_4 4 |
#define | MS_5 5 |
#define | MS_6 6 |
#define | MS_7 7 |
#define | MS_8 8 |
#define | MS_9 9 |
#define | MS_10 10 |
#define | MS_20 20 |
#define | MS_30 30 |
#define | MS_40 40 |
#define | MS_50 50 |
#define | MS_60 60 |
#define | MS_70 70 |
#define | MS_80 80 |
#define | MS_90 90 |
#define | MS_100 100 |
#define | MS_150 150 |
#define | MS_200 200 |
#define | MS_250 250 |
#define | MS_300 300 |
#define | MS_350 350 |
#define | MS_400 400 |
#define | MS_450 450 |
#define | MS_500 500 |
#define | MS_600 600 |
#define | MS_700 700 |
#define | MS_800 800 |
#define | MS_900 900 |
#define | SEC_1 1000 |
#define | SEC_2 2000 |
#define | SEC_3 3000 |
#define | SEC_4 4000 |
#define | SEC_5 5000 |
#define | SEC_6 6000 |
#define | SEC_7 7000 |
#define | SEC_8 8000 |
#define | SEC_9 9000 |
#define | SEC_10 10000 |
#define | SEC_15 15000 |
#define | SEC_20 20000 |
#define | SEC_30 30000 |
#define | MIN_1 60000 |
#define | NOTE_WHOLE 1000 |
#define | NOTE_HALF (NOTE_WHOLE/2) |
#define | NOTE_QUARTER (NOTE_WHOLE/4) |
#define | NOTE_EIGHT (NOTE_WHOLE/8) |
#define | NOTE_SIXTEEN (NOTE_WHOLE/16) |
#define | TONE_C3 131 |
#define | TONE_CS3 139 |
#define | TONE_D3 147 |
#define | TONE_DS3 156 |
#define | TONE_E3 165 |
#define | TONE_F3 175 |
#define | TONE_FS3 185 |
#define | TONE_G3 196 |
#define | TONE_GS3 208 |
#define | TONE_A3 220 |
#define | TONE_AS3 233 |
#define | TONE_B3 247 |
#define | TONE_C4 262 |
#define | TONE_CS4 277 |
#define | TONE_D4 294 |
#define | TONE_DS4 311 |
#define | TONE_E4 330 |
#define | TONE_F4 349 |
#define | TONE_FS4 370 |
#define | TONE_G4 392 |
#define | TONE_GS4 415 |
#define | TONE_A4 440 |
#define | TONE_AS4 466 |
#define | TONE_B4 494 |
#define | TONE_C5 523 |
#define | TONE_CS5 554 |
#define | TONE_D5 587 |
#define | TONE_DS5 622 |
#define | TONE_E5 659 |
#define | TONE_F5 698 |
#define | TONE_FS5 740 |
#define | TONE_G5 784 |
#define | TONE_GS5 831 |
#define | TONE_A5 880 |
#define | TONE_AS5 932 |
#define | TONE_B5 988 |
#define | TONE_C6 1047 |
#define | TONE_CS6 1109 |
#define | TONE_D6 1175 |
#define | TONE_DS6 1245 |
#define | TONE_E6 1319 |
#define | TONE_F6 1397 |
#define | TONE_FS6 1480 |
#define | TONE_G6 1568 |
#define | TONE_GS6 1661 |
#define | TONE_A6 1760 |
#define | TONE_AS6 1865 |
#define | TONE_B6 1976 |
#define | TONE_C7 2093 |
#define | TONE_CS7 2217 |
#define | TONE_D7 2349 |
#define | TONE_DS7 2489 |
#define | TONE_E7 2637 |
#define | TONE_F7 2794 |
#define | TONE_FS7 2960 |
#define | TONE_G7 3136 |
#define | TONE_GS7 3322 |
#define | TONE_A7 3520 |
#define | TONE_AS7 3729 |
#define | TONE_B7 3951 |
Functions | |
void | Wait (long ms) |
Wait some milliseconds. | |
void | Yield (void) |
Yield to another task. | |
void | StopAllTasks (void) |
Stop all tasks. | |
void | Stop (bool bvalue) |
Stop the running program. | |
void | ExitTo (task newTask) |
Exit to another task. | |
void | StartTask (task t) |
Start a task. | |
int | SizeOf (variant &value) |
Calculate the size of a variable. | |
int | read (void) |
Read a value from a file. | |
int | write (const int value) |
Write value to file. | |
int | sqrt (int x) |
Compute square root. | |
int | abs (int num) |
Absolute value. | |
char | sign (int num) |
Sign value. | |
int | close (void) |
Close file. | |
byte | open (const char *mode) |
Open file. | |
char | putchar (const char ch) |
Write character to debug device. | |
int | puts (const char *str) |
Write string to debug device. | |
void | printf (const char *format,...) |
Print formatted data to debug device. | |
void | abort (void) |
Abort current process. | |
long | CurrentTick (void) |
Read the current system tick. | |
int | pop (void) |
Pop a value off the stack. | |
int | push (int value) |
Push a value onto the stack. | |
void | RotateLeft (int &value) |
Rotate left. | |
void | RotateRight (int &value) |
Rotate right. | |
void | Run (const int slot) |
Run another program. | |
int | stat (void) |
Check log file status. | |
void | StopProcesses (void) |
Stop all processes. | |
int | isupper (int c) |
Check if character is uppercase letter. | |
int | islower (int c) |
Check if character is lowercase letter. | |
int | isalpha (int c) |
Check if character is alphabetic. | |
int | isdigit (int c) |
Check if character is decimal digit. | |
int | isalnum (int c) |
Check if character is alphanumeric. | |
int | isspace (int c) |
Check if character is a white-space. | |
int | iscntrl (int c) |
Check if character is a control character. | |
int | isprint (int c) |
Check if character is printable. | |
int | isgraph (int c) |
Check if character has graphical representation. | |
int | ispunct (int c) |
Check if character is a punctuation. | |
int | isxdigit (int c) |
Check if character is hexadecimal digit. | |
int | toupper (int c) |
Convert lowercase letter to uppercase. | |
int | tolower (int c) |
Convert uppercase letter to lowercase. | |
Constants, macros, and API functions for SPC.
SPCDefs.h contains declarations for the SPC API resources
License:
The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Initial Developer of this code is John Hansen. Portions created by John Hansen are Copyright (C) 2009-2013 John Hansen. All Rights Reserved.