From 408beca7fd8d688b37838983852aa706fed138ea Mon Sep 17 00:00:00 2001 From: noxuz Date: Mon, 6 Apr 2020 21:05:14 -0500 Subject: [PATCH] Added module folder and updated CMakeLists.txt --- S32K/{src => module}/canfd.cpp | 6 ++---- S32K/{ => module}/libuavcan/media/S32K/canfd.hpp | 2 +- S32K/test/CMakeLists.txt | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) rename S32K/{src => module}/canfd.cpp (99%) rename S32K/{ => module}/libuavcan/media/S32K/canfd.hpp (99%) diff --git a/S32K/src/canfd.cpp b/S32K/module/canfd.cpp similarity index 99% rename from S32K/src/canfd.cpp rename to S32K/module/canfd.cpp index b3b6118..3ef8193 100644 --- a/S32K/src/canfd.cpp +++ b/S32K/module/canfd.cpp @@ -24,9 +24,7 @@ /* STL queue for the intermediate ISR buffer */ #include -/* libuavcan core header files */ -#include "libuavcan/media/can.hpp" -#include "libuavcan/media/interfaces.hpp" +/* libuavcan core header file for static pool allocator */ #include "libuavcan/platform/memory.hpp" /* CMSIS Core for __REV macro use */ @@ -97,7 +95,7 @@ static std::deque> 2u]; +volatile static std::uint32_t data_ISR_word[InterfaceGroup::FrameType::MTUBytes / 4u]; /* Counter for the number of discarded messages due to the RX FIFO being full */ volatile static std::uint32_t g_discarded_frames_count[CANFD_Count] = {DISCARD_COUNT_ARRAY}; diff --git a/S32K/libuavcan/media/S32K/canfd.hpp b/S32K/module/libuavcan/media/S32K/canfd.hpp similarity index 99% rename from S32K/libuavcan/media/S32K/canfd.hpp rename to S32K/module/libuavcan/media/S32K/canfd.hpp index d7406fc..8531fa7 100644 --- a/S32K/libuavcan/media/S32K/canfd.hpp +++ b/S32K/module/libuavcan/media/S32K/canfd.hpp @@ -7,7 +7,7 @@ /** * @file * Header driver file for the media layer of Libuavcan v1 targeting - * the NXP S32K14 family of automotive grade MCU's running + * the NXP S32K14 family of automotive grade MCU's, running * CAN-FD at 4Mbit/s data phase and 1Mbit/s in nominal phase. */ diff --git a/S32K/test/CMakeLists.txt b/S32K/test/CMakeLists.txt index 793a8f4..e36158a 100644 --- a/S32K/test/CMakeLists.txt +++ b/S32K/test/CMakeLists.txt @@ -25,7 +25,7 @@ endif() include_directories( . - ../S32K + ../S32K/module ${CMAKE_CURRENT_BINARY_DIR}/libuavcan-src/libuavcan/include ) @@ -73,5 +73,5 @@ set(CMAKE_C_FLAGS ) -add_executable(test_sanity test_sanity.cpp ../S32K/s32k_libuavcan.cpp) +add_executable(test_sanity test_sanity.cpp ../S32K/module/canfd.cpp) add_test(NAME run_test_sanity COMMAND test_sanity)