MMEx with SPI Slave to allow legacy devices to communicate with modern media such as USB, SD cards, the internet and all of the mbed\'s other interfaces

Dependencies:   NetServices MSCUsbHost mbed TMP102 SDFileSystem

Committer:
DeMein
Date:
Sun Feb 27 18:54:40 2011 +0000
Revision:
0:67a55a82ce06
Version as submitted to the NXP Design Challenge

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DeMein 0:67a55a82ce06 1 /* MMEx for MBED - MBED specific command processing
DeMein 0:67a55a82ce06 2 * Copyright (c) 2011 MK
DeMein 0:67a55a82ce06 3 *
DeMein 0:67a55a82ce06 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
DeMein 0:67a55a82ce06 5 * of this software and associated documentation files (the "Software"), to deal
DeMein 0:67a55a82ce06 6 * in the Software without restriction, including without limitation the rights
DeMein 0:67a55a82ce06 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
DeMein 0:67a55a82ce06 8 * copies of the Software, and to permit persons to whom the Software is
DeMein 0:67a55a82ce06 9 * furnished to do so, subject to the following conditions:
DeMein 0:67a55a82ce06 10 *
DeMein 0:67a55a82ce06 11 * The above copyright notice and this permission notice shall be included in
DeMein 0:67a55a82ce06 12 * all copies or substantial portions of the Software.
DeMein 0:67a55a82ce06 13 *
DeMein 0:67a55a82ce06 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
DeMein 0:67a55a82ce06 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
DeMein 0:67a55a82ce06 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
DeMein 0:67a55a82ce06 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
DeMein 0:67a55a82ce06 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
DeMein 0:67a55a82ce06 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
DeMein 0:67a55a82ce06 20 * THE SOFTWARE.
DeMein 0:67a55a82ce06 21 */
DeMein 0:67a55a82ce06 22
DeMein 0:67a55a82ce06 23 /**
DeMein 0:67a55a82ce06 24 \file mfuncs.h
DeMein 0:67a55a82ce06 25 \brief Commands starting with M for MBED features
DeMein 0:67a55a82ce06 26 */
DeMein 0:67a55a82ce06 27
DeMein 0:67a55a82ce06 28 #ifndef MFUNCS_H
DeMein 0:67a55a82ce06 29 #define MFUNCS_H
DeMein 0:67a55a82ce06 30
DeMein 0:67a55a82ce06 31 #include "mmex.h"
DeMein 0:67a55a82ce06 32
DeMein 0:67a55a82ce06 33 // definition of the M-functions
DeMein 0:67a55a82ce06 34 #define mled 'L' // control LED's
DeMein 0:67a55a82ce06 35 #define mversion 'V' // get version string
DeMein 0:67a55a82ce06 36 #define mwelcome 'W' // get welcome string
DeMein 0:67a55a82ce06 37 #define mstatus 'S' // get MMex status
DeMein 0:67a55a82ce06 38 #define mdebug 'D' // control DEBUG level
DeMein 0:67a55a82ce06 39 #define merror 'E' // get latest error message
DeMein 0:67a55a82ce06 40 #define mbaud 'B' // set console baud rate
DeMein 0:67a55a82ce06 41 #define mcase 'C' // set case of text output
DeMein 0:67a55a82ce06 42 #define mtime 'T' // set/get mbed RTC value
DeMein 0:67a55a82ce06 43 #define mreset 'R' // MBed warm restart
DeMein 0:67a55a82ce06 44
DeMein 0:67a55a82ce06 45 #define ledon '1' // value for LED ON
DeMein 0:67a55a82ce06 46 #define ledoff '0' // value for LED ON
DeMein 0:67a55a82ce06 47 #define ledtog 'T' // value for LED toggle
DeMein 0:67a55a82ce06 48 #define ledread 'R' // value for LED read
DeMein 0:67a55a82ce06 49
DeMein 0:67a55a82ce06 50 #define ucase 'U' // value for Upper Case
DeMein 0:67a55a82ce06 51 #define nocase 'N' // value for no change to case
DeMein 0:67a55a82ce06 52
DeMein 0:67a55a82ce06 53 void parse_M();
DeMein 0:67a55a82ce06 54 void do_mled();
DeMein 0:67a55a82ce06 55 void do_mversion();
DeMein 0:67a55a82ce06 56 void do_mwelcome();
DeMein 0:67a55a82ce06 57 void do_mstatus();
DeMein 0:67a55a82ce06 58 void do_mdebug();
DeMein 0:67a55a82ce06 59 void do_merror();
DeMein 0:67a55a82ce06 60 void do_mreset();
DeMein 0:67a55a82ce06 61 void do_mbaud();
DeMein 0:67a55a82ce06 62 void do_mcase();
DeMein 0:67a55a82ce06 63 void do_mtime();
DeMein 0:67a55a82ce06 64 void do_mdefault();
DeMein 0:67a55a82ce06 65
DeMein 0:67a55a82ce06 66 #endif