mirror of
https://github.com/tenderlove/initial-v.git
synced 2025-04-14 19:29:34 +00:00
make this work with cpp
This commit is contained in:
parent
f9543171be
commit
1d40fa353a
firmware
@ -3,6 +3,7 @@
|
||||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(bmw-keyboard)
|
||||
project(initial-v)
|
||||
|
@ -1,3 +1,11 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
uint8_t crc8(uint8_t crc, uint8_t const *buf, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include <driver/twai.h>
|
||||
#include <bmw_crc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline bool
|
||||
SHIFTER_BACK_P(twai_message_t message)
|
||||
{
|
||||
@ -29,4 +33,8 @@ void shifter_send_drive(bool moveable);
|
||||
void shifter_send_reset(void);
|
||||
void shifter_send_light(uint8_t counter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,2 +1,2 @@
|
||||
idf_component_register(SRCS "bmw-keyboard.c"
|
||||
idf_component_register(SRCS "initial-v.cpp"
|
||||
INCLUDE_DIRS ".")
|
||||
|
@ -139,7 +139,7 @@ timer_callback(TimerHandle_t pxTimer)
|
||||
xQueueSend(tx_task_queue, &tx_action, portMAX_DELAY);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
extern "C" void app_main(void)
|
||||
{
|
||||
ctrl_task_sem = xSemaphoreCreateBinary();
|
||||
tx_task_queue = xQueueCreate(1, sizeof(tx_task_action_t));
|
Loading…
Reference in New Issue
Block a user