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.
BetaTransporter.cpp
00001 #include "BetaTransporter.h" 00002 00003 BetaTransporter::BetaTransporter() 00004 : pool(), 00005 i2c(SDA,SCL) 00006 { 00007 00008 } 00009 00010 bool BetaTransporter::set() 00011 { 00012 bool no_error = true; 00013 00014 i2c.transport_begin(JUSHINKUN_ADDR, pool.ctrl.all_data, 10); 00015 no_error = no_error & i2c.read(); 00016 i2c.transport_end(); 00017 00018 /*i2c.transport_begin(APPER_BODY_ADDR, pool.a.all_data, 4); 00019 no_error = no_error & i2c.write(); 00020 i2c.transport_end(); 00021 00022 i2c.transport_begin(APPER_BODY_ADDR, pool.ar.all_data, 1); 00023 no_error = no_error & i2c.read(); 00024 i2c.transport_end(); 00025 */ 00026 00027 pool.up_load(); 00028 00029 return no_error; 00030 } 00031 00032 void BetaTransporter::write(int index_num, int data) 00033 { 00034 pool.data_index[index_num] = data; 00035 } 00036 00037 00038 int BetaTransporter::read(int index_num) 00039 { 00040 return pool.data_index[index_num]; 00041 } 00042 00043 void BetaTransporter::reset() 00044 { 00045 pool.reset(); 00046 } 00047
Generated on Sat Jul 16 2022 15:06:07 by
1.7.2