@@ -133,15 +133,6 @@ int ObcWithC2a::ReceivedByObc_C2A(int port_id, unsigned char* buffer, int offset
133133 return port->ReadRx (buffer, offset, length);
134134}
135135
136- // If the character encoding of C2A is UTF-8, these functions are not necessary,
137- // and users can directory use SendFromObc_C2A and ReceivedByObc_C2A
138- int OBC_C2A_SendFromObc (int port_id, unsigned char * buffer, int offset, int length) {
139- return ObcWithC2a::SendFromObc_C2A (port_id, buffer, offset, length);
140- }
141- int OBC_C2A_ReceivedByObc (int port_id, unsigned char * buffer, int offset, int length) {
142- return ObcWithC2a::ReceivedByObc_C2A (port_id, buffer, offset, length);
143- }
144-
145136int ObcWithC2a::I2cConnectPort (int port_id, const unsigned char i2c_address) {
146137 if (i2c_com_ports_c2a_[port_id] != nullptr ) {
147138 // Port already used
@@ -212,16 +203,6 @@ int ObcWithC2a::I2cComponentReadCommand(int port_id, const unsigned char i2c_add
212203 return 0 ;
213204}
214205
215- int OBC_C2A_I2cWriteCommand (int port_id, const unsigned char i2c_address, const unsigned char * data, const unsigned char length) {
216- return ObcWithC2a::I2cWriteCommand (port_id, i2c_address, data, length);
217- }
218- int OBC_C2A_I2cWriteRegister (int port_id, const unsigned char i2c_address, const unsigned char * data, const unsigned char length) {
219- return ObcWithC2a::I2cWriteRegister (port_id, i2c_address, data, length);
220- }
221- int OBC_C2A_I2cReadRegister (int port_id, const unsigned char i2c_address, unsigned char * data, const unsigned char length) {
222- return ObcWithC2a::I2cReadRegister (port_id, i2c_address, data, length);
223- }
224-
225206int ObcWithC2a::GpioConnectPort (int port_id) {
226207 if (gpio_ports_c2a_[port_id] != nullptr ) {
227208 // Port already used
@@ -255,8 +236,28 @@ bool ObcWithC2a::GpioRead_C2A(int port_id) {
255236 return port->DigitalRead ();
256237}
257238
258- int OBC_C2A_GpioWrite ( int port_id, const bool is_high) { return ObcWithC2a::GpioWrite_C2A (port_id, is_high); }
239+ } // namespace s2e::components
259240
260- bool OBC_C2A_GpioRead (int port_id) { return ObcWithC2a::GpioRead_C2A (port_id); }
241+ // C2A用
242+ // If the character encoding of C2A is UTF-8, these functions are not necessary,
243+ // and users can directory use SendFromObc_C2A and ReceivedByObc_C2A
244+ int OBC_C2A_SendFromObc (int port_id, unsigned char * buffer, int offset, int length) {
245+ return s2e::components::ObcWithC2a::SendFromObc_C2A (port_id, buffer, offset, length);
246+ }
247+ int OBC_C2A_ReceivedByObc (int port_id, unsigned char * buffer, int offset, int length) {
248+ return s2e::components::ObcWithC2a::ReceivedByObc_C2A (port_id, buffer, offset, length);
249+ }
261250
262- } // namespace s2e::components
251+ int OBC_C2A_I2cWriteCommand (int port_id, const unsigned char i2c_address, const unsigned char * data, const unsigned char length) {
252+ return s2e::components::ObcWithC2a::I2cWriteCommand (port_id, i2c_address, data, length);
253+ }
254+ int OBC_C2A_I2cWriteRegister (int port_id, const unsigned char i2c_address, const unsigned char * data, const unsigned char length) {
255+ return s2e::components::ObcWithC2a::I2cWriteRegister (port_id, i2c_address, data, length);
256+ }
257+ int OBC_C2A_I2cReadRegister (int port_id, const unsigned char i2c_address, unsigned char * data, const unsigned char length) {
258+ return s2e::components::ObcWithC2a::I2cReadRegister (port_id, i2c_address, data, length);
259+ }
260+
261+ int OBC_C2A_GpioWrite (int port_id, const bool is_high) { return s2e::components::ObcWithC2a::GpioWrite_C2A (port_id, is_high); }
262+
263+ bool OBC_C2A_GpioRead (int port_id) { return s2e::components::ObcWithC2a::GpioRead_C2A (port_id); }
0 commit comments