cliff
Fork of WizFi250Interface by
Embed:
(wiki syntax)
Show/hide line numbers
WizFi250_ifc.cpp
00001 /* WizFi250 00002 * Copyright (c) 2015 ARM Limited 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #include "WizFi250.h" 00017 00018 bool WizFi250::startup(void) 00019 { 00020 reset(); 00021 00022 cmdAT(); 00023 if( cmdMECHO(false) == -1) return false; 00024 //if( cmdMECHO(true) == -1) return false; 00025 if(_cts != NULL && _rts != NULL) 00026 { 00027 if( cmdUSET(_baud,"HW") == -1) return false; 00028 } 00029 else 00030 { 00031 if( cmdUSET(_baud,"N") == -1) return false; 00032 } 00033 wait_ms(1000); 00034 if( cmdAT() == -1) return false; 00035 00036 return true; 00037 } 00038 00039 bool WizFi250::reset(void) 00040 { 00041 _reset = 0; 00042 wait_ms(500); 00043 _reset = 1; 00044 00045 return true; 00046 }
Generated on Sat Jul 16 2022 21:04:00 by 1.7.2