Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MPU9250_SPI
Fork of WearableDevice_Nucleo by
event.cpp@23:aad5fd1b3ef9, 2017-10-25 (annotated)
- Committer:
- Muglug
- Date:
- Wed Oct 25 13:24:05 2017 +0000
- Revision:
- 23:aad5fd1b3ef9
- Parent:
- 18:7f9c2b8541e1
- Child:
- 24:eed68c95160c
SD Card Working.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gusteibolt | 6:939df52d75c9 | 1 | /* |
gusteibolt | 6:939df52d75c9 | 2 | * Los Putacos |
gusteibolt | 6:939df52d75c9 | 3 | * Copyright (C) 2017, All rights reserved. |
Muglug | 23:aad5fd1b3ef9 | 4 | * ________________________________________ |
gusteibolt | 6:939df52d75c9 | 5 | * |
gusteibolt | 6:939df52d75c9 | 6 | * Created by: Gustavo Campana, Michael Schmidt, Miguel Lopez |
gusteibolt | 6:939df52d75c9 | 7 | * Date: 12-Oct-2017 |
gusteibolt | 6:939df52d75c9 | 8 | * Version: V0.1 |
gusteibolt | 10:577e1fc4453e | 9 | */ |
gusteibolt | 7:ebaaff27840b | 10 | #include "mbed.h" |
gusteibolt | 8:ba93a973f967 | 11 | #include "event.h" |
Muglug | 23:aad5fd1b3ef9 | 12 | #include "XBeeLib.h" |
Muglug | 23:aad5fd1b3ef9 | 13 | |
Muglug | 23:aad5fd1b3ef9 | 14 | extern XBeeLib::XBeeZB XBee; |
Muglug | 23:aad5fd1b3ef9 | 15 | |
Muglug | 23:aad5fd1b3ef9 | 16 | void CheckInputBuffer(void) |
Muglug | 23:aad5fd1b3ef9 | 17 | { |
Muglug | 23:aad5fd1b3ef9 | 18 | // Check for Received Frames |
Muglug | 23:aad5fd1b3ef9 | 19 | XBee.process_rx_frames(); |
Muglug | 23:aad5fd1b3ef9 | 20 | } |
Muglug | 23:aad5fd1b3ef9 | 21 | |
Muglug | 23:aad5fd1b3ef9 | 22 | void ReadIMUData(void) |
Muglug | 23:aad5fd1b3ef9 | 23 | { |
Muglug | 23:aad5fd1b3ef9 | 24 | |
Muglug | 23:aad5fd1b3ef9 | 25 | } |
gusteibolt | 7:ebaaff27840b | 26 | |
gusteibolt | 10:577e1fc4453e | 27 | /* |
gusteibolt | 7:ebaaff27840b | 28 | void print_stinrg(char c = '*') { |
gusteibolt | 7:ebaaff27840b | 29 | pc.putc(c); |
gusteibolt | 7:ebaaff27840b | 30 | } |
gusteibolt | 10:577e1fc4453e | 31 | */ |
gusteibolt | 7:ebaaff27840b | 32 | |
gusteibolt | 10:577e1fc4453e | 33 | /* |
gusteibolt | 10:577e1fc4453e | 34 | void print_event(void const *argv, int i) { |
gusteibolt | 10:577e1fc4453e | 35 | pc.printf("%d ",i); |
gusteibolt | 7:ebaaff27840b | 36 | pc.printf((const char*)argv); |
gusteibolt | 10:577e1fc4453e | 37 | pc.printf("\r\n"); |
gusteibolt | 7:ebaaff27840b | 38 | } |
gusteibolt | 10:577e1fc4453e | 39 | */ |
gusteibolt | 7:ebaaff27840b | 40 | |
gusteibolt | 10:577e1fc4453e | 41 | /* |
gusteibolt | 7:ebaaff27840b | 42 | void blink_event(DigitalOut pin){ |
gusteibolt | 7:ebaaff27840b | 43 | pin = 1; |
Muglug | 23:aad5fd1b3ef9 | 44 | } |
gusteibolt | 10:577e1fc4453e | 45 | */ |
gusteibolt | 10:577e1fc4453e | 46 | |
Muglug | 23:aad5fd1b3ef9 | 47 | /* |
gusteibolt | 10:577e1fc4453e | 48 | void readIMU(){ |
gusteibolt | 10:577e1fc4453e | 49 | //imu.resetMPU9250(); |
Muglug | 18:7f9c2b8541e1 | 50 | PC.printf("%d\r\r ", time_stamp.read()); |
Muglug | 23:aad5fd1b3ef9 | 51 | }*/ |
gusteibolt | 12:c88478dfc622 | 52 | |
Muglug | 23:aad5fd1b3ef9 | 53 | /*void gayEvent(){ |
Muglug | 18:7f9c2b8541e1 | 54 | PC.printf("Is Michi schwul? (1 - true, 0 - false): "); |
Muglug | 18:7f9c2b8541e1 | 55 | PC.printf("%d", 1); |
Muglug | 23:aad5fd1b3ef9 | 56 | PC.printf("\r\n"); |
Muglug | 23:aad5fd1b3ef9 | 57 | }*/ |
Muglug | 23:aad5fd1b3ef9 | 58 | /* |
Muglug | 23:aad5fd1b3ef9 | 59 | void print_event(void const *argv, int i) |
Muglug | 23:aad5fd1b3ef9 | 60 | { |
Muglug | 23:aad5fd1b3ef9 | 61 | pc.printf("%d ",i); |
Muglug | 23:aad5fd1b3ef9 | 62 | pc.printf((const char*)argv); |
Muglug | 23:aad5fd1b3ef9 | 63 | pc.printf("\r\n"); |
Muglug | 23:aad5fd1b3ef9 | 64 | } |
Muglug | 23:aad5fd1b3ef9 | 65 | //----------------------------------------------------------------- |
Muglug | 23:aad5fd1b3ef9 | 66 | */ |
Muglug | 23:aad5fd1b3ef9 | 67 | //----------------------------------------------------------------- |
Muglug | 23:aad5fd1b3ef9 | 68 | /*void blink_event(DigitalOut pin){ |
Muglug | 23:aad5fd1b3ef9 | 69 | pin = !pin; |
Muglug | 23:aad5fd1b3ef9 | 70 | }*/ |
Muglug | 23:aad5fd1b3ef9 | 71 | //----------------------------------------------------------------- |
Muglug | 23:aad5fd1b3ef9 | 72 | |
Muglug | 23:aad5fd1b3ef9 | 73 | //----------------------------------------------------------------- |
Muglug | 23:aad5fd1b3ef9 | 74 | /*void println_event(){ |
Muglug | 23:aad5fd1b3ef9 | 75 | pc.printf("Arroz, feijao e batata\r\n"); |
Muglug | 23:aad5fd1b3ef9 | 76 | }*/ |
Muglug | 23:aad5fd1b3ef9 | 77 | //----------------------------------------------------------------- |