Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP:s2e-aobcのバージョンを更新 #332

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
# renovate: datasource=github-releases depName=ut-issl/s2e-aobc
S2E_AOBC_VERSION: v5.0.0
S2E_AOBC_VERSION: 1701e606e5469dea1db5714f9e17695e52d3a4f4

jobs:
build_c2a_with_s2e_win:
Expand Down Expand Up @@ -85,7 +85,6 @@ jobs:
ls cspice/include
ls cspice/generic_kernels
ls nrlmsise00
ls nrlmsise00/table
ls nrlmsise00/lib
ls nrlmsise00/lib/libnrlmsise00.lib
ls nrlmsise00/src
Expand Down Expand Up @@ -179,7 +178,6 @@ jobs:
ls cspice/include
ls cspice/generic_kernels
ls nrlmsise00
ls nrlmsise00/table
ls nrlmsise00/lib*
ls nrlmsise00/lib*/libnrlmsise00.a
ls nrlmsise00/src
Expand Down
8 changes: 4 additions & 4 deletions src/src_user/IfWrapper/Sils/gpio_sils.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <stdbool.h>
#include "../GPIO.h"

int OBC_C2A_GpioWrite(int port_id, const bool is_high);
bool OBC_C2A_GpioRead (int port_id);
int s2e::components::OBC_C2A_GpioWrite(int port_id, const bool is_high);
bool s2e::components::OBC_C2A_GpioRead (int port_id);

int GPIO_set_direction(const uint8_t port, const GPIO_DIRECTION direction)
{
Expand All @@ -11,11 +11,11 @@ int GPIO_set_direction(const uint8_t port, const GPIO_DIRECTION direction)

int GPIO_set_output(const uint8_t port, const GPIO_HL output)
{
OBC_C2A_GpioWrite((int)port, (bool)output);
s2e::components::OBC_C2A_GpioWrite((int)port, (bool)output);
return 0;
}

int GPIO_read_input(const uint8_t port)
{
return OBC_C2A_GpioRead((int)port);
return s2e::components::OBC_C2A_GpioRead((int)port);
}
12 changes: 6 additions & 6 deletions src/src_user/IfWrapper/Sils/i2c_sils.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include <src_core/IfWrapper/i2c.h>
#include <src_user/Settings/port_config.h>

int OBC_C2A_I2cWriteCommand (int port_id, const unsigned char i2c_addr, const unsigned char* data, const unsigned char len);
int OBC_C2A_I2cWriteRegister(int port_id, const unsigned char i2c_addr, const unsigned char* data, const unsigned char len);
int OBC_C2A_I2cReadRegister (int port_id, const unsigned char i2c_addr, unsigned char* data, const unsigned char len);
int s2e::components::OBC_C2A_I2cWriteCommand (int port_id, const unsigned char i2c_addr, const unsigned char* data, const unsigned char len);
int s2e::components::OBC_C2A_I2cWriteRegister(int port_id, const unsigned char i2c_addr, const unsigned char* data, const unsigned char len);
int s2e::components::OBC_C2A_I2cReadRegister (int port_id, const unsigned char i2c_addr, unsigned char* data, const unsigned char len);

int I2C_init(void* my_i2c_v)
{
Expand All @@ -27,7 +27,7 @@ int I2C_rx(void* my_i2c_v, void* data_v, int buffer_size)
int i_ret = 0;
unsigned char* data = (unsigned char*)data_v;

OBC_C2A_I2cReadRegister (my_i2c->ch, my_i2c->device_address, data, my_i2c->rx_length);
s2e::components::OBC_C2A_I2cReadRegister (my_i2c->ch, my_i2c->device_address, data, my_i2c->rx_length);
i_ret = my_i2c->rx_length;

return i_ret;
Expand All @@ -39,7 +39,7 @@ int I2C_tx(void* my_i2c_v, void* data_v, int data_size)
int i_ret = 0;
unsigned char* data = (unsigned char*)data_v;

OBC_C2A_I2cWriteCommand(my_i2c->ch, my_i2c->device_address, data, data_size);
s2e::components::OBC_C2A_I2cWriteCommand(my_i2c->ch, my_i2c->device_address, data, data_size);

// RW0003専用特殊処理 FIXME: 別の場所に置き換える->S2E側の大きな改修が必要なので少し後回し
if (my_i2c->ch == 1)
Expand All @@ -51,7 +51,7 @@ int I2C_tx(void* my_i2c_v, void* data_v, int data_size)
if (my_i2c->stop_flag == 0)
{
uint8_t ReadRegAddress = data[2];
OBC_C2A_I2cWriteCommand(my_i2c->ch, my_i2c->device_address, &ReadRegAddress, 1);
s2e::components::OBC_C2A_I2cWriteCommand(my_i2c->ch, my_i2c->device_address, &ReadRegAddress, 1);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/src_user/IfWrapper/Sils/uart_sils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ int UART_tx(void* my_uart_v, void* data_v, int data_size)
}
else
{
int result = OBC_C2A_SendFromObc(my_uart->ch, (unsigned char*)data_v, 0, data_size);
int result = s2e::components::OBC_C2A_SendFromObc(my_uart->ch, (unsigned char*)data_v, 0, data_size);

if (result < 0) return -1;
}
#else
int result = OBC_C2A_SendFromObc(my_uart->ch, (unsigned char*)data_v, 0, data_size);
int result = s2e::components::OBC_C2A_SendFromObc(my_uart->ch, (unsigned char*)data_v, 0, data_size);

if (result < 0) return -1;
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/src_user/IfWrapper/Sils/uart_sils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#define UART_SILS_H_


int OBC_C2A_SendFromObc(int port_id, unsigned char* buffer, int offset, int count);
int OBC_C2A_ReceivedByObc(int port_id, unsigned char* buffer, int offset, int count);
int s2e::components::OBC_C2A_SendFromObc(int port_id, unsigned char* buffer, int offset, int count);
int s2e::components::OBC_C2A_ReceivedByObc(int port_id, unsigned char* buffer, int offset, int count);

int UART_init(void* my_uart_v);
int UART_rx(void* my_uart_v, void* data_v, int buffer_size);
Expand Down
Loading