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.
Diff: YKNCT_I2C.cpp
- Revision:
- 17:b78b92e5c4b5
- Parent:
- 11:c7c764e21224
--- a/YKNCT_I2C.cpp Fri Apr 26 16:58:25 2019 +0000 +++ b/YKNCT_I2C.cpp Sat Apr 27 13:24:21 2019 +0000 @@ -7,10 +7,7 @@ void Y_I2C::Out_Set(OUT_I2C_Data_TypeDef *OUT_I2C_Data, uint8_t num, uint8_t value) { - if(value==1) - (OUT_I2C_Data+num) -> out_data |= 1; - else - (OUT_I2C_Data+num) -> out_data &= 0; + (OUT_I2C_Data+num) -> out_data =value; } void Y_I2C::Out(OUT_I2C_Data_TypeDef *OUT_I2C_Data, uint8_t MAX) @@ -31,6 +28,16 @@ } } +void Y_I2C::Servo_Set(SERVO_I2C_Data_TypeDef *SERVO_I2C_Data, uint8_t num, uint16_t pulse) +{ + (SERVO_I2C_Data+num)->pulse=pulse; +} + +void Y_I2C::Servo(SERVO_I2C_Data_TypeDef *SERVO_I2C_Data, uint8_t MAX) +{ +} + + void Y_I2C::In(IN_I2C_Data_TypeDef *IN_I2C_Data, uint8_t num) { char data;