ネットワークアップデート機能とか、Pachubeへの情報登録とかの処理を追加しています
Dependencies: Terminal EthernetNetIf Pachube TextLCD mbed ConfigFile FirmwareUpdater
appconf/appconf.h@1:1eb67d074bed, 2011-06-06 (annotated)
- Committer:
- abe00makoto
- Date:
- Mon Jun 06 19:56:43 2011 +0000
- Revision:
- 1:1eb67d074bed
- Parent:
- 0:a62f36392b9b
add set_time function. for fist use mbed
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
abe00makoto | 0:a62f36392b9b | 1 | /** |
abe00makoto | 0:a62f36392b9b | 2 | * ============================================================================= |
abe00makoto | 0:a62f36392b9b | 3 | * Application configuration for 'Expansion Board One' example no.2 |
abe00makoto | 0:a62f36392b9b | 4 | * http://mbed.org/users/shintamainjp/notebook/starboard_expbrd-one_ex2_en/ |
abe00makoto | 0:a62f36392b9b | 5 | * ============================================================================= |
abe00makoto | 0:a62f36392b9b | 6 | * Copyright (c) 2010 Shinichiro Nakamura (CuBeatSystems) |
abe00makoto | 0:a62f36392b9b | 7 | * |
abe00makoto | 0:a62f36392b9b | 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
abe00makoto | 0:a62f36392b9b | 9 | * of this software and associated documentation files (the "Software"), to deal |
abe00makoto | 0:a62f36392b9b | 10 | * in the Software without restriction, including without limitation the rights |
abe00makoto | 0:a62f36392b9b | 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
abe00makoto | 0:a62f36392b9b | 12 | * copies of the Software, and to permit persons to whom the Software is |
abe00makoto | 0:a62f36392b9b | 13 | * furnished to do so, subject to the following conditions: |
abe00makoto | 0:a62f36392b9b | 14 | * |
abe00makoto | 0:a62f36392b9b | 15 | * The above copyright notice and this permission notice shall be included in |
abe00makoto | 0:a62f36392b9b | 16 | * all copies or substantial portions of the Software. |
abe00makoto | 0:a62f36392b9b | 17 | * |
abe00makoto | 0:a62f36392b9b | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
abe00makoto | 0:a62f36392b9b | 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
abe00makoto | 0:a62f36392b9b | 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
abe00makoto | 0:a62f36392b9b | 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
abe00makoto | 0:a62f36392b9b | 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
abe00makoto | 0:a62f36392b9b | 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
abe00makoto | 0:a62f36392b9b | 24 | * THE SOFTWARE. |
abe00makoto | 0:a62f36392b9b | 25 | * ============================================================================= |
abe00makoto | 0:a62f36392b9b | 26 | */ |
abe00makoto | 0:a62f36392b9b | 27 | |
abe00makoto | 0:a62f36392b9b | 28 | typedef struct { |
abe00makoto | 0:a62f36392b9b | 29 | char apikey[256]; |
abe00makoto | 0:a62f36392b9b | 30 | char feedid[128]; |
abe00makoto | 0:a62f36392b9b | 31 | // int interval; |
abe00makoto | 0:a62f36392b9b | 32 | } appconf_t; |
abe00makoto | 0:a62f36392b9b | 33 | |
abe00makoto | 0:a62f36392b9b | 34 | /** |
abe00makoto | 0:a62f36392b9b | 35 | * Initialize configuration. |
abe00makoto | 0:a62f36392b9b | 36 | * |
abe00makoto | 0:a62f36392b9b | 37 | * @param p A pointer to a application config. |
abe00makoto | 0:a62f36392b9b | 38 | */ |
abe00makoto | 0:a62f36392b9b | 39 | void appconf_init(appconf_t *p); |
abe00makoto | 0:a62f36392b9b | 40 | |
abe00makoto | 0:a62f36392b9b | 41 | /** |
abe00makoto | 0:a62f36392b9b | 42 | * Read configuration. |
abe00makoto | 0:a62f36392b9b | 43 | * |
abe00makoto | 0:a62f36392b9b | 44 | * @param filename Filename. |
abe00makoto | 0:a62f36392b9b | 45 | * @param p A pointer to a application config. |
abe00makoto | 0:a62f36392b9b | 46 | * @return Return zero if it succeed. |
abe00makoto | 0:a62f36392b9b | 47 | */ |
abe00makoto | 0:a62f36392b9b | 48 | int appconf_read(char *filename, appconf_t *p); |
abe00makoto | 0:a62f36392b9b | 49 | |
abe00makoto | 0:a62f36392b9b | 50 | /** |
abe00makoto | 0:a62f36392b9b | 51 | * Write configuration. |
abe00makoto | 0:a62f36392b9b | 52 | * |
abe00makoto | 0:a62f36392b9b | 53 | * @param filename Filename. |
abe00makoto | 0:a62f36392b9b | 54 | * @param p A pointer to a application config. |
abe00makoto | 0:a62f36392b9b | 55 | * @return Return zero if it succeed. |
abe00makoto | 0:a62f36392b9b | 56 | */ |
abe00makoto | 0:a62f36392b9b | 57 | int appconf_write(char *filename, appconf_t *p); |