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.
solenoid.cpp
00001 #include "solenoid.h" 00002 void solenoid::output() 00003 { 00004 i2c->write(adr<<1,&PORT,1); 00005 } 00006 solenoid::solenoid(I2C *I2c,char adr_):i2c(I2c) 00007 { 00008 adr=adr_; 00009 } 00010 solenoid& solenoid::operator=(char po) 00011 { 00012 PORT=po; 00013 output(); 00014 return *this; 00015 } 00016 void solenoid::Port(char port,char po) 00017 { 00018 port= 0b100000000 >> port; 00019 if(po==0) { 00020 port ^= 0xFF; 00021 PORT = PORT & port; 00022 } else 00023 PORT = PORT | port; 00024 output(); 00025 }
Generated on Fri Jul 29 2022 23:32:01 by
1.7.2