
demo of the murata wifi chip. This demo tries to connect to an open wifi access point and prints out all the relevant information about the connection. It then scans all wifi access points nearby and reports their information.
Dependencies: SNICInterface mbed-rtos mbed
Fork of SNIC-xively-jumpstart-demo by
Revision 22:e567f0d4b05d, committed 2014-07-15
- Comitter:
- kishino
- Date:
- Tue Jul 15 09:56:43 2014 +0000
- Parent:
- 21:25b85cbbdd82
- Child:
- 23:39cf9f03b076
- Commit message:
- The platform-dependent code was modified to implemented in ifdef.; The process of debug log output was changed to macro.;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Tue Jul 15 09:56:43 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/chris/code/C12832/#7de323fa46fe
--- a/C12832_lcd.lib Tue Jul 15 02:08:48 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://mbed.org/users/dreschpe/code/C12832_lcd/#c9afe58d786a
--- a/PowerControl/EthernetPowerControl.cpp Tue Jul 15 02:08:48 2014 +0000 +++ b/PowerControl/EthernetPowerControl.cpp Tue Jul 15 09:56:43 2014 +0000 @@ -1,3 +1,4 @@ +#if defined(TARGET_LPC1768) #include "EthernetPowerControl.h" static void write_PHY (unsigned int PhyReg, unsigned short Value) { @@ -135,4 +136,5 @@ regv = read_PHY(PHY_REG_EDCR); write_PHY(PHY_REG_BMCR, regv & ~(1 << PHY_REG_EDCR_ENABLE)); regv = read_PHY(PHY_REG_EDCR); -} \ No newline at end of file +} +#endif
--- a/SNICInterface.lib Tue Jul 15 02:08:48 2014 +0000 +++ b/SNICInterface.lib Tue Jul 15 09:56:43 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/murata/code/SNICInterface/#a1233ca02edf +http://mbed.org/teams/murata/code/SNICInterface/#b6b10c22a121
--- a/app_board_io.cpp Tue Jul 15 02:08:48 2014 +0000 +++ b/app_board_io.cpp Tue Jul 15 09:56:43 2014 +0000 @@ -1,7 +1,7 @@ #include "app_board_io.h" -#include "C12832_lcd.h" +#include "C12832.h" -extern C12832_LCD lcd; +extern C12832 lcd; extern "C" void lcd_printf( const char* fmt, ... ) {
--- a/main.cpp Tue Jul 15 02:08:48 2014 +0000 +++ b/main.cpp Tue Jul 15 09:56:43 2014 +0000 @@ -29,13 +29,18 @@ #include "MMA7660.h" #include "LM75B.h" -#include "C12832_lcd.h" +#include "C12832.h" +#if defined(TARGET_LPC1768) #include "PowerControl/EthernetPowerControl.h" - +C12832 lcd(p5, p7, p6, p8, p11); MMA7660 axl(p28, p27); LM75B tmp(p28, p27); -C12832_LCD lcd; +#elif defined(TARGET_LPC1549) +C12832 lcd(D11, D13, D12, D7, D10); +MMA7660 axl(SDA, SCL); +LM75B tmp(SDA, SCL); +#endif #include "logo.h" @@ -45,15 +50,21 @@ #define DEMO_AP_SECUTIRY_KEY_LEN 8 /** Wi-Fi SNIC UART Interface*/ +#if defined(TARGET_LPC1768) C_SNIC_WifiInterface mSNICwifi( p9, p10, NC, NC, p30 ); -Serial pc(USBTX, USBRX); +Serial pc(USBTX, USBRX); /* for DEBUG_PRINT */ +#elif defined(TARGET_LPC1549) +C_SNIC_WifiInterface mSNICwifi( D0, D1, NC, NC, D3 ); +Serial pc(P2_12, P2_11); /* for DEBUG_PRINT */ +#endif int main() { +#if defined(TARGET_LPC1768) PHY_PowerDown(); - +#endif pc.baud( 115200 ); - printf("main\r\n"); + DEBUG_PRINT("main\r\n"); lcd_print_xively_logo(); // Initialize Wi-Fi interface