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.
Fork of libMiMic by
core/net/NyLPC_cNet.cpp@2:b96c1e90d120, 2013-03-27 (annotated)
- Committer:
- nyatla
- Date:
- Wed Mar 27 12:07:47 2013 +0000
- Revision:
- 2:b96c1e90d120
???????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nyatla | 2:b96c1e90d120 | 1 | #include "NyLPC_cNet.h" |
nyatla | 2:b96c1e90d120 | 2 | |
nyatla | 2:b96c1e90d120 | 3 | const char* NyLPC_cNet_PlatformName; |
nyatla | 2:b96c1e90d120 | 4 | |
nyatla | 2:b96c1e90d120 | 5 | static const char* PNAME_LPCXPRESSO1769="LPCXpresso1769"; |
nyatla | 2:b96c1e90d120 | 6 | static const char* PNAME_MBED="mbed"; |
nyatla | 2:b96c1e90d120 | 7 | |
nyatla | 2:b96c1e90d120 | 8 | void NyLPC_cNet_initialize(NyLPC_TcNet_t* i_inst) |
nyatla | 2:b96c1e90d120 | 9 | { |
nyatla | 2:b96c1e90d120 | 10 | //uipサービス初期化。いろいろ利用可能に。 |
nyatla | 2:b96c1e90d120 | 11 | NyLPC_cUipService_initialize(); |
nyatla | 2:b96c1e90d120 | 12 | } |
nyatla | 2:b96c1e90d120 | 13 | |
nyatla | 2:b96c1e90d120 | 14 | void NyLPC_cNet_start(NyLPC_TcNet_t* i_inst,const NyLPC_TcNetConfig_t* i_ref_config) |
nyatla | 2:b96c1e90d120 | 15 | { |
nyatla | 2:b96c1e90d120 | 16 | NyLPC_cUipService_start(&(i_ref_config->interface_setting.ethernet)); |
nyatla | 2:b96c1e90d120 | 17 | //プラットフォーム名を推測(デバイス名の初めの1文字だけ見る。) |
nyatla | 2:b96c1e90d120 | 18 | switch(*(NyLPC_cUipService_refDeviceName())){ |
nyatla | 2:b96c1e90d120 | 19 | case 'L': |
nyatla | 2:b96c1e90d120 | 20 | NyLPC_cNet_PlatformName=PNAME_LPCXPRESSO1769; |
nyatla | 2:b96c1e90d120 | 21 | break; |
nyatla | 2:b96c1e90d120 | 22 | case 'D': |
nyatla | 2:b96c1e90d120 | 23 | NyLPC_cNet_PlatformName=PNAME_MBED; |
nyatla | 2:b96c1e90d120 | 24 | break; |
nyatla | 2:b96c1e90d120 | 25 | default: |
nyatla | 2:b96c1e90d120 | 26 | break; |
nyatla | 2:b96c1e90d120 | 27 | } |
nyatla | 2:b96c1e90d120 | 28 | return; |
nyatla | 2:b96c1e90d120 | 29 | } |