From 940f930ab6f92d9262a70e8d3a09e589be806e4a Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Fri, 13 Oct 2023 19:26:17 +0900 Subject: [PATCH] fix small --- .../driver_buffer_define.h | 6 ++-- .../applications/driver_instances/di_aobc.c | 4 +-- .../applications/driver_instances/di_gs.c | 8 ++--- .../driver_instances/di_uart_test.c | 8 ++--- .../src/src_user/component_driver/aocs/aobc.c | 10 +++--- .../src/src_user/component_driver/com/gs.c | 32 +++++++++---------- .../src/src_user/component_driver/com/gs.h | 8 ++--- .../src_user/component_driver/etc/uart_test.c | 10 +++--- .../driver_buffer_define.h | 6 ++-- .../applications/driver_instances/di_mobc.c | 4 +-- .../src/src_user/component_driver/etc/mobc.c | 8 ++--- 11 files changed, 52 insertions(+), 52 deletions(-) diff --git a/examples/mobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h b/examples/mobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h index 3ba66baed..dea128d49 100644 --- a/examples/mobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h +++ b/examples/mobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h @@ -7,8 +7,8 @@ #include "./driver_super_params.h" -#define CDS_STREAM_REC_BUFFER_SIZE_DEFAULT (CDS_IF_RX_BUFFER_SIZE * 2) /*!< CDS_StreamRecBuffer のバッファサイズのデフォルト値 - UART などの非同期通信はメモリに余力があれば CDS_IF_RX_BUFFER_SIZE * 2 を推奨 - 詳細は dirver_super.c の @note を参照 */ +#define CDS_STREAM_REC_BUFFER_SIZE_DEFAULT (CDS_IF_RX_BUFFER_SIZE * 2) /*!< CDS_StreamRecBuffer のバッファサイズのデフォルト値 + UART などの非同期通信はメモリに余力があれば CDS_IF_RX_BUFFER_SIZE * 2 を推奨 + 詳細は dirver_super.c の @note を参照 */ #endif diff --git a/examples/mobc/src/src_user/applications/driver_instances/di_aobc.c b/examples/mobc/src/src_user/applications/driver_instances/di_aobc.c index 3b5521310..f290fcb33 100644 --- a/examples/mobc/src/src_user/applications/driver_instances/di_aobc.c +++ b/examples/mobc/src/src_user/applications/driver_instances/di_aobc.c @@ -44,8 +44,8 @@ static RESULT DI_AOBC_init_(void) RESULT err = RESULT_OK; ret1 = CDS_init_stream_rec_buffer(&DI_AOBC_rx_buffer_, - DI_AOBC_rx_buffer_allocation_, - sizeof(DI_AOBC_rx_buffer_allocation_)); + DI_AOBC_rx_buffer_allocation_, + sizeof(DI_AOBC_rx_buffer_allocation_)); if (ret1 != CDS_ERR_CODE_OK) { Printf("AOBC buffer init Failed ! %d \n", ret1); diff --git a/examples/mobc/src/src_user/applications/driver_instances/di_gs.c b/examples/mobc/src/src_user/applications/driver_instances/di_gs.c index bd7de62fc..c4975d258 100644 --- a/examples/mobc/src/src_user/applications/driver_instances/di_gs.c +++ b/examples/mobc/src/src_user/applications/driver_instances/di_gs.c @@ -55,11 +55,11 @@ static RESULT DI_GS_init_(void) CDS_ERR_CODE ret1; CDS_ERR_CODE ret2; ret1 = CDS_init_stream_rec_buffer(&DI_GS_ccsds_rx_buffer_[stream], - DI_GS_ccsds_rx_buffer_allocation_[stream], - sizeof(DI_GS_ccsds_rx_buffer_allocation_[stream])); + DI_GS_ccsds_rx_buffer_allocation_[stream], + sizeof(DI_GS_ccsds_rx_buffer_allocation_[stream])); ret2 = CDS_init_stream_rec_buffer(&DI_GS_uart_rx_buffer_[stream], - DI_GS_uart_rx_buffer_allocation_[stream], - sizeof(DI_GS_uart_rx_buffer_allocation_[stream])); + DI_GS_uart_rx_buffer_allocation_[stream], + sizeof(DI_GS_uart_rx_buffer_allocation_[stream])); if (ret1 != CDS_ERR_CODE_OK || ret2 != CDS_ERR_CODE_OK) { Printf("GS buffer init Failed ! %d, %d \n", ret1, ret2); diff --git a/examples/mobc/src/src_user/applications/driver_instances/di_uart_test.c b/examples/mobc/src/src_user/applications/driver_instances/di_uart_test.c index dc7303deb..1f1616c40 100644 --- a/examples/mobc/src/src_user/applications/driver_instances/di_uart_test.c +++ b/examples/mobc/src/src_user/applications/driver_instances/di_uart_test.c @@ -55,15 +55,15 @@ static void UART_TEST_init_(void) CDS_nullify_stream_rec_buffers(rx_buffers); ret1 = CDS_init_stream_rec_buffer(&DI_UART_TEST_rx_buffer_0_, - DI_UART_TEST_rx_buffer_allocation_0_, - sizeof(DI_UART_TEST_rx_buffer_allocation_0_)); + DI_UART_TEST_rx_buffer_allocation_0_, + sizeof(DI_UART_TEST_rx_buffer_allocation_0_)); if (ret1 != CDS_ERR_CODE_OK) { Printf("UART_TEST buffer0 init Failed ! %d \n", ret1); } ret1 = CDS_init_stream_rec_buffer(&DI_UART_TEST_rx_buffer_1_, - DI_UART_TEST_rx_buffer_allocation_1_, - sizeof(DI_UART_TEST_rx_buffer_allocation_1_)); + DI_UART_TEST_rx_buffer_allocation_1_, + sizeof(DI_UART_TEST_rx_buffer_allocation_1_)); if (ret1 != CDS_ERR_CODE_OK) { Printf("UART_TEST buffer1 init Failed ! %d \n", ret1); diff --git a/examples/mobc/src/src_user/component_driver/aocs/aobc.c b/examples/mobc/src/src_user/component_driver/aocs/aobc.c index 8e8d2c310..0af309311 100644 --- a/examples/mobc/src/src_user/component_driver/aocs/aobc.c +++ b/examples/mobc/src/src_user/component_driver/aocs/aobc.c @@ -21,7 +21,7 @@ static uint8_t AOBC_tx_frame_[EB90_FRAME_HEADER_SIZE + static CDS_ERR_CODE AOBC_load_driver_super_init_settings_(ComponentDriverSuper* p_super); static CDS_ERR_CODE AOBC_analyze_rec_data_(CDS_StreamConfig* p_stream_config, - void* p_driver); + void* p_driver); CDS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch, CDS_StreamRecBuffer* rx_buffer) { @@ -37,9 +37,9 @@ CDS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch, CDS_StreamRecB aobc_driver->driver.uart_config.stop_bit = UART_STOP_BIT_1BIT; ret = CDS_init(&(aobc_driver->driver.super), - &(aobc_driver->driver.uart_config), - rx_buffer, - AOBC_load_driver_super_init_settings_); + &(aobc_driver->driver.uart_config), + rx_buffer, + AOBC_load_driver_super_init_settings_); if (ret != CDS_ERR_CODE_OK) return CDS_INIT_CDS_INIT_ERR; return CDS_INIT_OK; } @@ -85,7 +85,7 @@ CDS_REC_ERR_CODE AOBC_rec(AOBC_Driver* aobc_driver) static CDS_ERR_CODE AOBC_analyze_rec_data_(CDS_StreamConfig* p_stream_config, - void* p_driver) + void* p_driver) { AOBC_Driver* aobc_driver = (AOBC_Driver*)p_driver; diff --git a/examples/mobc/src/src_user/component_driver/com/gs.c b/examples/mobc/src/src_user/component_driver/com/gs.c index cfe44fab2..9a44e1d5e 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.c +++ b/examples/mobc/src/src_user/component_driver/com/gs.c @@ -57,9 +57,9 @@ static void GS_load_default_driver_super_init_settings_(ComponentDriverSuper* p_ static CDS_ERR_CODE GS_analyze_rec_data_(CDS_StreamConfig* p_stream_config, void* p_driver); CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, - uint8_t uart_ch, - CDS_StreamRecBuffer* ccsds_rx_buffers[CDS_STREAM_MAX], - CDS_StreamRecBuffer* uart_rx_buffers[CDS_STREAM_MAX]) + uint8_t uart_ch, + CDS_StreamRecBuffer* ccsds_rx_buffers[CDS_STREAM_MAX], + CDS_StreamRecBuffer* uart_rx_buffers[CDS_STREAM_MAX]) { CDS_ERR_CODE ret_uart, ret_ccsds; int i; @@ -89,13 +89,13 @@ CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, } ret_ccsds = CDS_init_streams(&gs_driver->driver_ccsds.super, - &gs_driver->driver_ccsds.ccsds_config, - ccsds_rx_buffers, - GS_load_ccsds_driver_super_init_settings_); + &gs_driver->driver_ccsds.ccsds_config, + ccsds_rx_buffers, + GS_load_ccsds_driver_super_init_settings_); ret_uart = CDS_init_streams(&gs_driver->driver_uart.super, - &gs_driver->driver_uart.uart_config, - uart_rx_buffers, - GS_load_uart_driver_super_init_settings_); + &gs_driver->driver_uart.uart_config, + uart_rx_buffers, + GS_load_uart_driver_super_init_settings_); if (ret_ccsds != CDS_ERR_CODE_OK || ret_uart != CDS_ERR_CODE_OK) return CDS_INIT_CDS_INIT_ERR; gs_driver->latest_info = &gs_driver->info[GS_PORT_TYPE_CCSDS]; gs_driver->tlm_tx_port_type = GS_PORT_TYPE_CCSDS; @@ -169,20 +169,20 @@ CDS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver) for (i = 0; i < GS_PORT_TYPE_NUM; ++i) { - ComponentDriverSuper* ds; + ComponentDriverSuper* cds; if (i == GS_PORT_TYPE_CCSDS) { - ds = &gs_driver->driver_ccsds.super; + cds = &gs_driver->driver_ccsds.super; } else { - ds = &gs_driver->driver_uart.super; + cds = &gs_driver->driver_uart.super; } // TODO: これはエラー情報をきちんと把握したいので,アノマリ発行を入れる - gs_driver->info[i].rx.rec_status = CDS_receive(ds); - gs_driver->info[i].rx.ret_from_if_rx = CDSC_get_rec_status(ds)->ret_from_if_rx; + gs_driver->info[i].rx.rec_status = CDS_receive(cds); + gs_driver->info[i].rx.ret_from_if_rx = CDSC_get_rec_status(cds)->ret_from_if_rx; if (gs_driver->info[i].rx.rec_status != CDS_ERR_CODE_OK) continue; @@ -190,10 +190,10 @@ CDS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver) { CDS_StreamConfig* p_stream_config; - p_stream_config = &ds->stream_config[stream]; + p_stream_config = &cds->stream_config[stream]; if (CDSSC_get_rec_status(p_stream_config)->status_code != CDS_STREAM_REC_STATUS_FIXED_FRAME) continue; - gs_driver->info[i].rx.rec_status = CDS_analyze_rec_data(ds, stream, gs_driver); + gs_driver->info[i].rx.rec_status = CDS_analyze_rec_data(cds, stream, gs_driver); } } diff --git a/examples/mobc/src/src_user/component_driver/com/gs.h b/examples/mobc/src/src_user/component_driver/com/gs.h index 2907c2743..cd35da36f 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.h +++ b/examples/mobc/src/src_user/component_driver/com/gs.h @@ -35,7 +35,7 @@ typedef struct { struct { - CDS_ERR_CODE rec_status; //!< ComponentDriverSuper からの受信結果 + CDS_ERR_CODE rec_status; //!< ComponentDriverSuper からの受信結果 int ret_from_if_rx; //!< UART or CCSDS からの返り値 CCP_DEST_TYPE last_dest_type; //!< 最後に受信したパケットの dest type cycle_t last_rec_time; //!< 最後に受信した時刻 @@ -94,9 +94,9 @@ typedef struct * @return CDS_INIT_ERR_CODE */ CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, - uint8_t uart_ch, - CDS_StreamRecBuffer* ccsds_rx_buffers[CDS_STREAM_MAX], - CDS_StreamRecBuffer* uart_rx_buffers[CDS_STREAM_MAX]); + uint8_t uart_ch, + CDS_StreamRecBuffer* ccsds_rx_buffers[CDS_STREAM_MAX], + CDS_StreamRecBuffer* uart_rx_buffers[CDS_STREAM_MAX]); /** * @brief 地上から CMD を受信する. 形式は TC Transer Frame diff --git a/examples/mobc/src/src_user/component_driver/etc/uart_test.c b/examples/mobc/src/src_user/component_driver/etc/uart_test.c index b6815ef9f..4e2eca770 100644 --- a/examples/mobc/src/src_user/component_driver/etc/uart_test.c +++ b/examples/mobc/src/src_user/component_driver/etc/uart_test.c @@ -32,16 +32,16 @@ CDS_INIT_ERR_CODE UART_TEST_init(UART_TEST_Driver* uart_test_driver, uint8_t ch, { CDS_ERR_CODE ret; - uart_test_driver->driver.uart_config.ch = ch; - uart_test_driver->driver.uart_config.baudrate = 38400; + uart_test_driver->driver.uart_config.ch = ch; + uart_test_driver->driver.uart_config.baudrate = 38400; uart_test_driver->driver.uart_config.parity_settings = PARITY_SETTINGS_NONE; uart_test_driver->driver.uart_config.data_length = UART_DATA_LENGTH_8BIT; uart_test_driver->driver.uart_config.stop_bit = UART_STOP_BIT_1BIT; ret = CDS_init_streams(&(uart_test_driver->driver.super), - &(uart_test_driver->driver.uart_config), - rx_buffers, - UART_TEST_load_driver_super_init_settings_); + &(uart_test_driver->driver.uart_config), + rx_buffers, + UART_TEST_load_driver_super_init_settings_); if (ret != CDS_ERR_CODE_OK) return CDS_INIT_CDS_INIT_ERR; return CDS_INIT_OK; } diff --git a/examples/subobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h b/examples/subobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h index 3ba66baed..dea128d49 100644 --- a/examples/subobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h +++ b/examples/subobc/src/src_user/Settings/component_driver_super/driver_buffer_define.h @@ -7,8 +7,8 @@ #include "./driver_super_params.h" -#define CDS_STREAM_REC_BUFFER_SIZE_DEFAULT (CDS_IF_RX_BUFFER_SIZE * 2) /*!< CDS_StreamRecBuffer のバッファサイズのデフォルト値 - UART などの非同期通信はメモリに余力があれば CDS_IF_RX_BUFFER_SIZE * 2 を推奨 - 詳細は dirver_super.c の @note を参照 */ +#define CDS_STREAM_REC_BUFFER_SIZE_DEFAULT (CDS_IF_RX_BUFFER_SIZE * 2) /*!< CDS_StreamRecBuffer のバッファサイズのデフォルト値 + UART などの非同期通信はメモリに余力があれば CDS_IF_RX_BUFFER_SIZE * 2 を推奨 + 詳細は dirver_super.c の @note を参照 */ #endif diff --git a/examples/subobc/src/src_user/applications/driver_instances/di_mobc.c b/examples/subobc/src/src_user/applications/driver_instances/di_mobc.c index 8a5b244f0..83dec04e0 100644 --- a/examples/subobc/src/src_user/applications/driver_instances/di_mobc.c +++ b/examples/subobc/src/src_user/applications/driver_instances/di_mobc.c @@ -38,8 +38,8 @@ static RESULT DI_MOBC_init_(void) RESULT err = RESULT_OK; ret1 = CDS_init_stream_rec_buffer(&DI_MOBC_rx_buffer_, - DI_MOBC_rx_buffer_allocation_, - sizeof(DI_MOBC_rx_buffer_allocation_)); + DI_MOBC_rx_buffer_allocation_, + sizeof(DI_MOBC_rx_buffer_allocation_)); if (ret1 != CDS_ERR_CODE_OK) { Printf("MOBC buffer init Failed ! %d \n", ret1); diff --git a/examples/subobc/src/src_user/component_driver/etc/mobc.c b/examples/subobc/src/src_user/component_driver/etc/mobc.c index 06723d309..5d70cf98e 100644 --- a/examples/subobc/src/src_user/component_driver/etc/mobc.c +++ b/examples/subobc/src/src_user/component_driver/etc/mobc.c @@ -20,7 +20,7 @@ static uint8_t MOBC_tx_frame_[EB90_FRAME_HEADER_SIZE + static CDS_ERR_CODE MOBC_load_driver_super_init_settings_(ComponentDriverSuper* p_super); static CDS_ERR_CODE MOBC_analyze_rec_data_(CDS_StreamConfig* p_stream_config, - void* p_driver); + void* p_driver); CDS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch, CDS_StreamRecBuffer* rx_buffer) @@ -36,9 +36,9 @@ CDS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch, CDS_StreamRecB mobc_driver->driver.uart_config.stop_bit = UART_STOP_BIT_1BIT; ret = CDS_init(&(mobc_driver->driver.super), - &(mobc_driver->driver.uart_config), - rx_buffer, - MOBC_load_driver_super_init_settings_); + &(mobc_driver->driver.uart_config), + rx_buffer, + MOBC_load_driver_super_init_settings_); if (ret != CDS_ERR_CODE_OK) return CDS_INIT_CDS_INIT_ERR; return CDS_INIT_OK; }