Sam Grove
/
Re-InvokeISP
Testing documentation
Revision 1:e835875b325c, committed 2011-04-18
- Comitter:
- sgrove
- Date:
- Mon Apr 18 04:09:29 2011 +0000
- Parent:
- 0:116ff1f909ba
- Child:
- 2:60a7f968d4ad
- Commit message:
- r2
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Aug 27 20:58:54 2010 +0000 +++ b/main.cpp Mon Apr 18 04:09:29 2011 +0000 @@ -1,7 +1,12 @@ #include "mbed.h" +//! using a led DigitalOut myled(LED1); +/** + * @param[in] - none + * @return - none + */ void DisconnectPLL0(){ // good practice to disable before feeding __disable_irq(); @@ -25,27 +30,67 @@ LPC_SC->SCS = 0x00; } -// IAP address +//! IAP address #define IAP_LOCATION 0x1FFF1FF1 -// variable for command and result +//! variable for command and result unsigned int command[5]; unsigned int result[5]; -// function pointer with 2 parameters +//! function pointer with 2 array parameters typedef void (*IAP)(unsigned int[5],unsigned int [5]); -// declaration of the fptr. +//! declaration of the fptr. IAP iap_entry = (IAP)IAP_LOCATION; + +/** Servo control class, based on a PwmOut + * + * Example: + * @code + * // Continuously sweep the servo through it's full range + * #include "mbed.h" + * #include "Servo.h" + * + * Servo myservo(p21); + * + * int main() { + * while(1) { + * for(int i=0; i<100; i++) { + * myservo = i/100.0; + * wait(0.01); + * } + * for(int i=100; i>0; i--) { + * myservo = i/100.0; + * wait(0.01); + * } + * } + * } + * @endcode + */ +/** Create a servo object connected to the specified PwmOut pin + * + * @param pin PwmOut pin to connect to + */ + + /** A brief description of the function foo + * + * More details about the function goes here + * and here + * + * @param x a variable used by foo + * @returns something magical done with x + */ +int foo(int x) {...} + int main(){ - // change clk to 4MHz - see below + //! change clk to 4MHz - see below DisconnectPLL0(); - // stop all ISRs + //! stop all ISRs __disable_irq(); - //make IAP call + //!make IAP call command[0] = 57; iap_entry(command, result); - // This should never get executed + //! This should never get executed while(1) { myled = 1; wait(0.2);