Skip to content

Commit 7689c2d

Browse files
committed
Release v6.0.1
1 parent 179c2b2 commit 7689c2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1485
-559
lines changed

Interfaces/Patterns/COMMON/common_interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ FlagStatus Common_GetProtectionStatus(void)
8282

8383
/**
8484
* @brief Register a callback function to be called at the end of commands processing.
85-
* @retval None
85+
* @retval None.
8686
*/
8787
void Common_SetPostProcessingCallback(Function_Pointer Callback)
8888
{
@@ -91,7 +91,7 @@ void Common_SetPostProcessingCallback(Function_Pointer Callback)
9191

9292
/**
9393
* @brief Start post processing task.
94-
* @retval None
94+
* @retval None.
9595
*/
9696
void Common_StartPostProcessing()
9797
{

Interfaces/Patterns/COMMON/common_interface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#ifndef COMMON_INTERFACE_H
2121
#define COMMON_INTERFACE_H
2222

23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
2327
/* Includes ------------------------------------------------------------------*/
2428
/* Exported types ------------------------------------------------------------*/
2529
typedef void (*Function_Pointer)(void);
@@ -34,4 +38,8 @@ FlagStatus Common_GetProtectionStatus(void);
3438
void Common_SetPostProcessingCallback(Function_Pointer Callback);
3539
void Common_StartPostProcessing(void);
3640

41+
#ifdef __cplusplus
42+
}
43+
#endif
44+
3745
#endif /* COMMON_INTERFACE_H */

Interfaces/Patterns/ENGI BYTES/engibytes_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ OPENBL_MemoryTypeDef EB_Descriptor =
3333
{
3434
EB_START_ADDRESS,
3535
EB_END_ADDRESS,
36-
(64),
36+
EB_SIZE,
3737
EB_AREA,
3838
OPENBL_EB_Read,
3939
NULL,

Interfaces/Patterns/ENGI BYTES/engibytes_interface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@
2020
#ifndef ENGIBYTES_INTERFACE_H
2121
#define ENGIBYTES_INTERFACE_H
2222

23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
2327
/* Includes ------------------------------------------------------------------*/
2428
/* Exported types ------------------------------------------------------------*/
2529
/* Exported constants --------------------------------------------------------*/
2630
/* Exported macro ------------------------------------------------------------*/
2731
/* Exported functions ------------------------------------------------------- */
2832
uint8_t OPENBL_EB_Read(uint32_t Address);
2933

34+
#ifdef __cplusplus
35+
}
36+
#endif
37+
3038
#endif /* ENGIBYTES_INTERFACE_H */

Interfaces/Patterns/FDCAN/fdcan_interface.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818

1919
/* Includes ------------------------------------------------------------------*/
2020
#include "platform.h"
21+
#include "interfaces_conf.h"
2122
#include "openbl_core.h"
2223
#include "openbl_fdcan_cmd.h"
2324
#include "fdcan_interface.h"
2425
#include "iwdg_interface.h"
25-
#include "interfaces_conf.h"
2626

2727
/* Private typedef -----------------------------------------------------------*/
2828
/* Private define ------------------------------------------------------------*/
2929
/* Private macro -------------------------------------------------------------*/
3030
/* Private variables ---------------------------------------------------------*/
31-
FDCAN_HandleTypeDef hfdcan;
32-
FDCAN_FilterTypeDef sFilterConfig;
33-
FDCAN_TxHeaderTypeDef TxHeader;
34-
FDCAN_RxHeaderTypeDef RxHeader;
31+
static FDCAN_HandleTypeDef hfdcan;
32+
static FDCAN_FilterTypeDef sFilterConfig;
33+
static FDCAN_TxHeaderTypeDef TxHeader;
34+
static FDCAN_RxHeaderTypeDef RxHeader;
3535
static uint8_t FdcanDetected = 0U;
3636

3737
/* Exported variables --------------------------------------------------------*/
@@ -42,7 +42,10 @@ uint8_t RxData[FDCAN_RAM_BUFFER_SIZE];
4242
static void OPENBL_FDCAN_Init(void);
4343

4444
/* Private functions ---------------------------------------------------------*/
45-
45+
/**
46+
* @brief This function is used to initialize the used FDCAN instance.
47+
* @retval None.
48+
*/
4649
static void OPENBL_FDCAN_Init(void)
4750
{
4851
/* Bit time configuration:
@@ -116,9 +119,7 @@ void OPENBL_FDCAN_Configuration(void)
116119
{
117120
/* Enable all resources clocks --------------------------------------------*/
118121
/* Enable used GPIOx clocks */
119-
__HAL_RCC_GPIOD_CLK_ENABLE();
120-
/* Enable FDCAN clock */
121-
__HAL_RCC_FDCAN_CLK_ENABLE();
122+
FDCANx_GPIO_CLK_ENABLE();
122123

123124
OPENBL_FDCAN_Init();
124125
}
@@ -143,7 +144,7 @@ void OPENBL_FDCAN_DeInit(void)
143144

144145
/**
145146
* @brief This function is used to detect if there is any activity on FDCAN protocol.
146-
* @retval None.
147+
* @retval Returns 1 if interface is detected else 0..
147148
*/
148149
uint8_t OPENBL_FDCAN_ProtocolDetection(void)
149150
{
@@ -196,7 +197,7 @@ uint8_t OPENBL_FDCAN_GetCommandOpcode(void)
196197
*/
197198
uint8_t OPENBL_FDCAN_ReadByte(void)
198199
{
199-
uint8_t byte = 0x0;
200+
uint8_t byte;
200201

201202
/* check if FIFO 0 receive at least one message */
202203
while (HAL_FDCAN_GetRxFifoFillLevel(&hfdcan, FDCAN_RX_FIFO0) < 1)
@@ -212,7 +213,7 @@ uint8_t OPENBL_FDCAN_ReadByte(void)
212213

213214
/**
214215
* @brief This function is used to read bytes from FDCAN pipe.
215-
* @retval Returns the read byte.
216+
* @retval None.
216217
*/
217218
void OPENBL_FDCAN_ReadBytes(uint8_t *Buffer, uint32_t BufferSize)
218219
{

Interfaces/Patterns/FDCAN/fdcan_interface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#ifndef FDCAN_INTERFACE_H
2121
#define FDCAN_INTERFACE_H
2222

23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
2327
/* Includes ------------------------------------------------------------------*/
2428
#include <stdint.h>
2529
#include "openbl_core.h"
@@ -39,4 +43,8 @@ void OPENBL_FDCAN_SendByte(uint8_t Byte);
3943
void OPENBL_FDCAN_SendBytes(uint8_t *Buffer, uint32_t BufferSize);
4044
void OPENBL_FDCAN_SpecialCommandProcess(OPENBL_SpecialCmdTypeDef *Frame);
4145

46+
#ifdef __cplusplus
47+
}
48+
#endif
49+
4250
#endif /* FDCAN_INTERFACE_H */

0 commit comments

Comments
 (0)