Skip to content

Commit

Permalink
Examples/mobc: apply rename migration(IfWrapper -> hal)
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Jul 21, 2023
1 parent 1c0d721 commit d1f9701
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Examples/mobc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ add_subdirectory(${C2A_CORE_DIR})

add_subdirectory(${C2A_USER_DIR}/Applications)
add_subdirectory(${C2A_USER_DIR}/Drivers)
add_subdirectory(${C2A_USER_DIR}/IfWrapper)
add_subdirectory(${C2A_USER_DIR}/hal)
add_subdirectory(${C2A_USER_DIR}/Library)
add_subdirectory(${C2A_USER_DIR}/Settings)
add_subdirectory(${C2A_USER_DIR}/TlmCmd)
Expand All @@ -85,7 +85,7 @@ set(C2A_USER_MODULES
C2A_USER_APPS
C2A_USER_CMD_TLM
C2A_USER_DRIVERS
C2A_USER_IF_WRAPPER
C2A_USER_HAL
C2A_USER_LIB
C2A_USER_SETTINGS
)
Expand Down
2 changes: 1 addition & 1 deletion Examples/mobc/src/src_user/Drivers/Aocs/aobc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef AOBC_H_
#define AOBC_H_

#include <src_core/IfWrapper/uart.h>
#include <src_core/hal/uart.h>
#include <src_core/Drivers/Super/driver_super.h>
#include <src_core/System/TimeManager/obc_time.h>
#include <src_core/TlmCmd/common_cmd_packet.h>
Expand Down
2 changes: 1 addition & 1 deletion Examples/mobc/src/src_user/Drivers/Com/gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <string.h>
#include <stdint.h>

#include "../../IfWrapper/ccsds_user.h"
#include "../../hal/ccsds_user.h"
#include "../../TlmCmd/Ccsds/tc_transfer_frame.h"
#include <src_core/Drivers/Super/driver_super.h>
#include <src_core/TlmCmd/packet_handler.h>
Expand Down
6 changes: 3 additions & 3 deletions Examples/mobc/src/src_user/Drivers/Com/gs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#include <src_core/TlmCmd/packet_handler.h>
#include <src_core/Drivers/Super/driver_super.h>
#include <src_core/IfWrapper/uart.h>
#include <src_core/IfWrapper/ccsds.h>
#include "../../IfWrapper/ccsds_user.h"
#include <src_core/hal/uart.h>
#include <src_core/hal/ccsds.h>
#include "../../hal/ccsds_user.h"
#include "../../TlmCmd/Ccsds/vcdu.h"
#include "gs_validate.h"

Expand Down
2 changes: 1 addition & 1 deletion Examples/mobc/src/src_user/Drivers/Etc/uart_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef UART_TEST_H_
#define UART_TEST_H_

#include <src_core/IfWrapper/uart.h>
#include <src_core/hal/uart.h>
#include <src_core/Drivers/Super/driver_super.h>

/**
Expand Down
2 changes: 1 addition & 1 deletion Examples/mobc/src/src_user/Script/AddSection/settings.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sub GetSetting {
$SETTING{'SEARCH_PATH'} = [
'Applications',
'Drivers',
'IfWrapper',
'hal',
'Library',
'Settings',
'TlmCmd'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13)

project(C2A_USER_IF_WRAPPER)
project(C2A_USER_HAL)

set(C2A_COMMON_SRCS
if_list.c
Expand All @@ -11,49 +11,49 @@ if(USE_SILS_MOCKUP)
message("USE SILS_MOCKUP")

#target_sources(${PROJECT_NAME} PRIVATE
set(C2A_IF_IMPL_SRCS
SilsMockup/ccsds_sils.c
SilsMockup/i2c_sils.c
SilsMockup/uart_sils.c
SilsMockup/wdt_sils.c
set(C2A_HAL_IMPL_SRCS
sils_mockup/ccsds_sils.c
sils_mockup/i2c_sils.c
sils_mockup/uart_sils.c
sils_mockup/wdt_sils.c
)
else()
#target_sources(${PROJECT_NAME} PUBLIC
set(C2A_IF_IMPL_COMMON_SRCS
Sils/ccsds_sils.cpp
Sils/i2c_sils.cpp
Sils/uart_sils.cpp
Sils/wdt_sils.cpp
set(C2A_HAL_IMPL_COMMON_SRCS
sils/ccsds_sils.cpp
sils/i2c_sils.cpp
sils/uart_sils.cpp
sils/wdt_sils.cpp
)

if(USE_SCI_COM_WINGS)
add_definitions(-DUSE_SCI_COM_WINGS)
#target_sources(${PROJECT_NAME} PUBLIC
set(C2A_IF_COM_WINGS_SRCS
Sils/ccsds_sils_sci_if.cpp
set(C2A_HAL_COM_WINGS_SRCS
sils/ccsds_sils_sci_if.cpp
)
message("USE SCI_COM_WINGS")
endif()

if(USE_SCI_COM_UART)
add_definitions(-DUSE_SCI_COM_UART)
#target_sources(${PROJECT_NAME} PUBLIC
set(C2A_IF_COM_UART_SRCS
Sils/uart_sils_sci_if.cpp
set(C2A_HAL_COM_UART_SRCS
sils/uart_sils_sci_if.cpp
)
message("USE SCI_COM_UART")
endif()

set(C2A_IF_IMPL_SRCS
${C2A_IF_IMPL_COMMON_SRCS}
${C2A_IF_COM_WINGS_SRCS}
${C2A_IF_COM_UART_SRCS}
set(C2A_HAL_IMPL_SRCS
${C2A_HAL_IMPL_COMMON_SRCS}
${C2A_HAL_COM_WINGS_SRCS}
${C2A_HAL_COM_UART_SRCS}
)
endif()

set(C2A_SRCS
${C2A_COMMON_SRCS}
${C2A_IF_IMPL_SRCS}
${C2A_HAL_IMPL_SRCS}
)

if(BUILD_C2A_AS_CXX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define CCSDS_USER_H_

#include <stdint.h>
#include <src_core/IfWrapper/ccsds.h>
#include <src_core/hal/ccsds.h>

#define CCSDS_FIFO_SIZE (8) // 現在使っている CCSDS API の設計上決まっている

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define IF_LIST_H_


#include <src_core/IfWrapper/ccsds.h>
#include <src_core/IfWrapper/uart.h>
#include <src_core/hal/ccsds.h>
#include <src_core/hal/uart.h>

typedef enum
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma section REPRO
#include <src_core/IfWrapper/i2c.h>
#include <src_core/hal/i2c.h>

int I2C_init(void* my_i2c_v)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma section REPRO
#include <src_core/IfWrapper/uart.h>
#include <src_core/hal/uart.h>
#include "../../Settings/port_config.h"

#ifdef USE_SCI_COM_UART
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <src_core/IfWrapper/wdt.h>
#include <src_core/hal/wdt.h>

int WDT_initialize(void* wdt_config)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SILS MOCKUP
- C2A Core 開発のために, Core 単体で C89 ビルドするための IF Wrapper Mockup
- C2A Core 開発のために, Core 単体で C89 ビルドするための HAL Mockup
- Core 開発では特定のハードウェアを仮定できないので, SILS を用いるが,現在のデフォルトの SILS である S2E は, C++ ビルドを行う.
- それでは, C89 の Core のコンパイルエラー,ワーニングのチェックができないため,非環境依存の Mockup を用いて, C89 ビルドする環境を用意したものがこれ.
- 検証したいコードは `src_user/IfWrapper/Sils` には存在しないはずなので,ビルドのみで実行しないのであれば,これで良い.
- 検証したいコードは `src_user/hal/sils` には存在しないはずなので,ビルドのみで実行しないのであれば,これで良い.
- 参考: https://github.com/ut-issl/c2a-core/issues/27
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma section REPRO
#include <src_core/IfWrapper/i2c.h>
#include <src_core/hal/i2c.h>

int I2C_init(void* my_i2c_v)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma section REPRO
#include <src_core/IfWrapper/uart.h>
#include <src_core/hal/uart.h>

int UART_init(void* my_uart_v)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <src_core/IfWrapper/wdt.h>
#include <src_core/hal/wdt.h>

int WDT_initialize(void* wdt_config)
{
Expand Down

0 comments on commit d1f9701

Please sign in to comment.