2012-04-01から1ヶ月間の記事一覧

gpsusb.cpp

#include "mbed.h" #include "usbgps.h" #define PL2303_SET_LINE_CODING 0x20 usbgps::usbgps() { m_init = false; m_connect = false; } int usbgps::readable() { if (!m_init) { _init(); } for(int i = 0; i < 2; i++) { if (!_receive.empty()) { retu…

evt_err_str.h

#ifndef EVT_ERR_STR_H #define EVT_ERR_STR_H #include "HTTPClient.h" #define CR(A) case A: return #A const char* HTTP_Str(HTTPResult r) { switch(r) { CR(HTTP_OK); ///

main.cpp

#include "mbed.h" #include "EthernetNetIf.h" #include "WIZ820ioNetIf.h" #include "HTTPClient.h" #include "HTTPServer.h" #include <assert.h> Serial pc(USBTX, USBRX); //#define MBED_ETH #ifdef MBED_ETH EthernetNetIf eth; #else WIZ820ioNetIf eth; #endi</assert.h>…

gae_PachubeClient_debug.py

GAE

#!/usr/bin/env python # -*- coding: utf-8 -*- # gae_PachubeClient_debug.py 2012.4.21 import logging import os import re import time import datetime import StringIO from google.appengine.ext import db from google.appengine.ext import webapp…

w5200NetIf/main.cpp

#include "WIZ820ioNetIf.h" #include "HTTPClient.h" #include "HTTPServer.h" WIZ820ioNetIf eth; HTTPServer svr; HTTPClient http; HTTPStream stream; void callback(HTTPResult r){printf("callback(%d)\n",r);} int main() { eth.setup(); svr.addHan…

W5200_ethernet.cpp

// W5200_ethernet.cpp 2012/4/7 #include "mbed.h" #include "w5100.h" #include "Utils.h" extern W5100Class W5100; // w5100.cpp class MyEthernet { int _socket; public: MyEthernet() { _socket = 0; W5100.writeSnMR( _socket, 0x40|SnMR::MACRAW); …

main.cpp

#include "mbed.h" Serial pc(USBTX, USBRX); Ethernet eth; extern "C" void mbed_mac_address(char * mac); int main() { pc.baud(460800); char buf[0x600]; mbed_mac_address(buf); printf("MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", buf[0], buf[1], buf…