working version of song control with initialization from sd card
Dependencies: MFRC522 NRF2401P SDFileSystem SPI_TFT_ILI9341 TFT_fonts mbed
Fork of Song_Control by
hub.cpp
- Committer:
- epgmdm
- Date:
- 2016-01-24
- Revision:
- 1:c2232b1eaf31
- Child:
- 2:d1eae91343a9
File content as of revision 1:c2232b1eaf31:
/** * All the code associated to run the mbed as a hub. * Link with locker */ #include "mbed.h" #include "utils.h" #define debug // Flags // Variables // tx nRF2401 long long addrLcker=0xBBBBBBBBBB; extern int channel; // Initializaton /** * Initialise for a locker * fp is the config file if additonal information is needed. */ void initialiseHub(FILE *fp){ #ifdef debug printf("Initialise Hub\n\r"); #endif // Read in hub address and channel if (fscanf (fp,"%x %*c %*s",&channel )!=1) writeError("Hub config: cannot read channel"); if (fscanf (fp,"%llx %*c %*s",&addrLcker )!=1) writeError("Hub config: cannot read hub address"); #ifdef debug printf(" Channel:%x, Hub Address %llx \n\r",channel, addrLcker); #endif } // Interupt routines // Loop through slow routines void loopHub(){ }