Convert the project to CMake
revamp f4ll move f4ll upstream to codeberg
This commit is contained in:
parent
bc01b1f0e8
commit
b1c676c394
244 changed files with 159826 additions and 189336 deletions
23
components/app/inc/application.h
Normal file
23
components/app/inc/application.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* app.h
|
||||
*
|
||||
* Created on: Aug 29, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef APP_H_
|
||||
#define APP_H_
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "main.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void MainLoop();
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C" {
|
||||
#endif // __cplusplus
|
||||
#endif /* APP_H_ */
|
27
components/app/inc/config.h
Normal file
27
components/app/inc/config.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* config.h
|
||||
*
|
||||
* Created on: Sep 24, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H_
|
||||
#define CONFIG_H_
|
||||
|
||||
#define USARTCOUNT 4
|
||||
#define CRCTASKCOUNT (USARTCOUNT * 2)
|
||||
#define USART1_OFFSET 0
|
||||
#define USART2_OFFSET 1
|
||||
#define USART3_OFFSET 2
|
||||
#define USART6_OFFSET 3
|
||||
|
||||
#define CONSOLE_DMA_ENGINE DMA1
|
||||
#define CONSOLE_TX_DMA_STREAM LL_DMA_STREAM_4
|
||||
|
||||
#define CRC_DMA_ENGINE DMA2
|
||||
#define CRC_DMA_STREAM LL_DMA_STREAM_4
|
||||
|
||||
#define MEMCPY_DMA_ENGINE DMA2
|
||||
#define MEMCPY_DMA_STREAM LL_DMA_STREAM_3
|
||||
|
||||
#endif /* CONFIG_H_ */
|
63
components/app/inc/diag.h
Normal file
63
components/app/inc/diag.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* diag.h
|
||||
*
|
||||
* Created on: Sep 16, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#ifndef DIAG_H_
|
||||
#define DIAG_H_
|
||||
|
||||
#ifdef ENABLE_DIAG
|
||||
#define DIAG_RX_BUFFER_SWITCH(x) \
|
||||
if(x) { \
|
||||
LL_GPIO_SetOutputPin(LED0_GPIO_Port, LED0_Pin); \
|
||||
LL_GPIO_ResetOutputPin(LED1_GPIO_Port, LED1_Pin); \
|
||||
} else { \
|
||||
LL_GPIO_ResetOutputPin(LED0_GPIO_Port, LED0_Pin); \
|
||||
LL_GPIO_SetOutputPin(LED1_GPIO_Port, LED1_Pin); \
|
||||
}
|
||||
|
||||
#define DIAG_INTERRUPT_IN() LL_GPIO_SetOutputPin(DBG0_GPIO_Port, DBG0_Pin)
|
||||
#define DIAG_INTERRUPT_OUT() LL_GPIO_ResetOutputPin(DBG0_GPIO_Port, DBG0_Pin)
|
||||
#define DIAG_CRC_CALC_START() LL_GPIO_SetOutputPin(DBG1_GPIO_Port, DBG1_Pin)
|
||||
#define DIAG_CRC_CALC_END() LL_GPIO_ResetOutputPin(DBG1_GPIO_Port, DBG1_Pin)
|
||||
//#define DIAG_ERROR_EVENT() LL_GPIO_TogglePin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
#define DIAG_ENTER_BUSY() LL_GPIO_SetOutputPin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
#define DIAG_EXIT_BUSY() LL_GPIO_ResetOutputPin(DBG2_GPIO_Port, DBG2_Pin)
|
||||
|
||||
#endif // _ENABLE_DIAG
|
||||
|
||||
#ifndef DIAG_RX_BUFFER_SWITCH
|
||||
# define DIAG_RX_BUFFER_SWITCH(x)
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_CRC_CALC_START
|
||||
# define DIAG_CRC_CALC_START()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_CRC_CALC_END
|
||||
# define DIAG_CRC_CALC_END()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_INTERRUPT_IN
|
||||
# define DIAG_INTERRUPT_IN()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_INTERRUPT_OUT
|
||||
# define DIAG_INTERRUPT_OUT()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_ERROR_EVENT
|
||||
# define DIAG_ERROR_EVENT()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_ENTER_BUSY
|
||||
# define DIAG_ENTER_BUSY()
|
||||
#endif
|
||||
|
||||
#ifndef DIAG_EXIT_BUSY
|
||||
# define DIAG_EXIT_BUSY()
|
||||
#endif
|
||||
|
||||
#endif /* DIAG_H_ */
|
15
components/app/inc/globals.h
Normal file
15
components/app/inc/globals.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* globals.h
|
||||
*
|
||||
* Created on: Aug 29, 2019
|
||||
* Author: abody
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
#include <f4ll/packet_usart.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
extern f4ll::packet_usart *g_usarts[USARTCOUNT];
|
||||
extern uint8_t g_statsBuf[256];
|
32
components/app/inc/irq_bridge.h
Normal file
32
components/app/inc/irq_bridge.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void usart1_rx_dma_isr(void);
|
||||
void usart1_tx_dma_isr(void);
|
||||
void usart1_isr(void);
|
||||
|
||||
void usart2_rx_dma_isr(void);
|
||||
void usart2_tx_dma_isr(void);
|
||||
void usart2_isr(void);
|
||||
|
||||
void usart3_rx_dma_isr(void);
|
||||
void usart3_tx_dma_isr(void);
|
||||
void usart3_isr(void);
|
||||
|
||||
void usart4_rx_dma_isr(void); // console
|
||||
void usart4_tx_dma_isr(void); // console
|
||||
void usart4_isr(void);
|
||||
|
||||
void usart6_rx_dma_isr(void); // console
|
||||
void usart6_tx_dma_isr(void); // console
|
||||
void usart6_isr(void);
|
||||
|
||||
void m2m1_dma_isr(void); // m2mcpy
|
||||
void m2m2_dma_isr(void); // crc
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue