Formatting changes preparing for code overhaul

This commit is contained in:
Ethan Zonca 2016-08-11 21:52:05 -04:00
parent fb0f55fd3b
commit be7432a65f
5 changed files with 156 additions and 327 deletions

View File

@ -7,7 +7,10 @@ CAN_FilterConfTypeDef filter;
uint32_t prescaler; uint32_t prescaler;
enum can_bus_state bus_state; enum can_bus_state bus_state;
void can_init(void) {
// Initialize CAN peripheral settings, but don't actually start the peripheral
void can_init(void)
{
filter.FilterIdHigh = 0; filter.FilterIdHigh = 0;
filter.FilterIdLow = 0; filter.FilterIdLow = 0;
filter.FilterMaskIdHigh = 0; filter.FilterMaskIdHigh = 0;
@ -25,8 +28,12 @@ void can_init(void) {
bus_state = OFF_BUS; bus_state = OFF_BUS;
} }
void can_enable(void) {
if (bus_state == OFF_BUS) { // Start the CAN peripheral
void can_enable(void)
{
if (bus_state == OFF_BUS)
{
hcan.Init.Prescaler = prescaler; hcan.Init.Prescaler = prescaler;
hcan.Init.Mode = CAN_MODE_NORMAL; hcan.Init.Mode = CAN_MODE_NORMAL;
hcan.Init.SJW = CAN_SJW_1TQ; hcan.Init.SJW = CAN_SJW_1TQ;
@ -45,8 +52,12 @@ void can_enable(void) {
} }
} }
void can_disable(void) {
if (bus_state == ON_BUS) { // Disable the CAN peripheral and go off-bus
void can_disable(void)
{
if (bus_state == ON_BUS)
{
// do a bxCAN reset (set RESET bit to 1) // do a bxCAN reset (set RESET bit to 1)
hcan.Instance->MCR |= CAN_MCR_RESET; hcan.Instance->MCR |= CAN_MCR_RESET;
bus_state = OFF_BUS; bus_state = OFF_BUS;
@ -54,13 +65,18 @@ void can_disable(void) {
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET);
} }
void can_set_bitrate(enum can_bitrate bitrate) {
if (bus_state == ON_BUS) { // Set the bitrate of the CAN peripheral
void can_set_bitrate(enum can_bitrate bitrate)
{
if (bus_state == ON_BUS)
{
// cannot set bitrate while on bus // cannot set bitrate while on bus
return; return;
} }
switch (bitrate) { switch (bitrate)
{
case CAN_BITRATE_10K: case CAN_BITRATE_10K:
prescaler = 600; prescaler = 600;
break; break;
@ -91,19 +107,27 @@ void can_set_bitrate(enum can_bitrate bitrate) {
} }
} }
void can_set_silent(uint8_t silent) {
if (bus_state == ON_BUS) { // Set CAN peripheral to silent mode
void can_set_silent(uint8_t silent)
{
if (bus_state == ON_BUS)
{
// cannot set silent mode while on bus // cannot set silent mode while on bus
return; return;
} }
if (silent) { if (silent)
{
hcan.Init.Mode = CAN_MODE_SILENT; hcan.Init.Mode = CAN_MODE_SILENT;
} else { } else {
hcan.Init.Mode = CAN_MODE_NORMAL; hcan.Init.Mode = CAN_MODE_NORMAL;
} }
} }
uint32_t can_tx(CanTxMsgTypeDef *tx_msg, uint32_t timeout) {
// Send a message on the CAN bus (blocking)
uint32_t can_tx(CanTxMsgTypeDef *tx_msg, uint32_t timeout)
{
uint32_t status; uint32_t status;
// transmit can frame // transmit can frame
@ -114,7 +138,10 @@ uint32_t can_tx(CanTxMsgTypeDef *tx_msg, uint32_t timeout) {
return status; return status;
} }
uint32_t can_rx(CanRxMsgTypeDef *rx_msg, uint32_t timeout) {
// Receive a message from the CAN bus (blocking)
uint32_t can_rx(CanRxMsgTypeDef *rx_msg, uint32_t timeout)
{
uint32_t status; uint32_t status;
hcan.pRxMsg = rx_msg; hcan.pRxMsg = rx_msg;
@ -125,8 +152,12 @@ uint32_t can_rx(CanRxMsgTypeDef *rx_msg, uint32_t timeout) {
return status; return status;
} }
uint8_t is_can_msg_pending(uint8_t fifo) {
if (bus_state == OFF_BUS) { // Check if a CAN message has been received and is waiting in the FIFO
uint8_t is_can_msg_pending(uint8_t fifo)
{
if (bus_state == OFF_BUS)
{
return 0; return 0;
} }
return (__HAL_CAN_MSG_PENDING(&hcan, fifo) > 0); return (__HAL_CAN_MSG_PENDING(&hcan, fifo) > 0);

View File

@ -1,80 +1,25 @@
/** //
****************************************************************************** // CANable firmware - a fork of CANtact by Eric Evenchick
* File Name : main.c //
* Date : 05/12/2014 20:22:28
* Description : Main program body
******************************************************************************
*
* COPYRIGHT(c) 2014 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f0xx_hal.h" #include "stm32f0xx_hal.h"
#include "usb_device.h" #include "usb_device.h"
/* USER CODE BEGIN Includes */
#include "usbd_cdc_if.h" #include "usbd_cdc_if.h"
#include "can.h" #include "can.h"
#include "slcan.h" #include "slcan.h"
#include "led.h" #include "led.h"
/* USER CODE END Includes */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void); void SystemClock_Config(void);
static void MX_GPIO_Init(void); static void MX_GPIO_Init(void);
static void led_init(void); static void led_init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
volatile int i=0; volatile int i=0;
int main(void) int main(void)
{ {
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init(); HAL_Init();
@ -87,11 +32,6 @@ int main(void)
led_init(); led_init();
MX_USB_DEVICE_Init(); MX_USB_DEVICE_Init();
/* USER CODE END 2 */
/* USER CODE BEGIN 3 */
// turn on green LED // turn on green LED
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);
@ -121,12 +61,8 @@ int main(void)
led_process(); led_process();
} }
/* USER CODE END 3 */
} }
/** System Clock Configuration
*/
void SystemClock_Config(void) void SystemClock_Config(void)
{ {
@ -236,7 +172,8 @@ void MX_GPIO_Init(void)
} }
/* USER CODE BEGIN 4 */ /* USER CODE BEGIN 4 */
static void led_init() { static void led_init()
{
GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1; GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
@ -245,34 +182,3 @@ static void led_init() {
GPIO_InitStruct.Alternate = 0; GPIO_InitStruct.Alternate = 0;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
} }
/* USER CODE END 4 */
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@ -1,18 +1,24 @@
//
// slcan: Parse incoming and generate outgoing slcan messages
#include "stm32f0xx_hal.h" #include "stm32f0xx_hal.h"
#include "can.h" #include "can.h"
#include "slcan.h" #include "slcan.h"
int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame) { int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame)
{
uint8_t i = 0; uint8_t i = 0;
uint8_t id_len, j; uint8_t id_len, j;
uint32_t tmp; uint32_t tmp;
for (j=0; j < SLCAN_MTU; j++) { for (j=0; j < SLCAN_MTU; j++)
{
buf[j] = '\0'; buf[j] = '\0';
} }
// add character for frame type // add character for frame type
if (frame->RTR == CAN_RTR_DATA) { if (frame->RTR == CAN_RTR_DATA)
{
buf[i] = 't'; buf[i] = 't';
} else if (frame->RTR == CAN_RTR_REMOTE) { } else if (frame->RTR == CAN_RTR_REMOTE) {
buf[i] = 'r'; buf[i] = 'r';
@ -21,8 +27,10 @@ int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame) {
// assume standard identifier // assume standard identifier
id_len = SLCAN_STD_ID_LEN; id_len = SLCAN_STD_ID_LEN;
tmp = frame->StdId; tmp = frame->StdId;
// check if extended // check if extended
if (frame->IDE == CAN_ID_EXT) { if (frame->IDE == CAN_ID_EXT)
{
// convert first char to upper case for extended frame // convert first char to upper case for extended frame
buf[i] -= 32; buf[i] -= 32;
id_len = SLCAN_EXT_ID_LEN; id_len = SLCAN_EXT_ID_LEN;
@ -31,7 +39,8 @@ int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame) {
i++; i++;
// add identifier to buffer // add identifier to buffer
for(j=id_len; j > 0; j--) { for(j=id_len; j > 0; j--)
{
// add nybble to buffer // add nybble to buffer
buf[j] = (tmp & 0xF); buf[j] = (tmp & 0xF);
tmp = tmp >> 4; tmp = tmp >> 4;
@ -42,13 +51,15 @@ int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame) {
buf[i++] = frame->DLC; buf[i++] = frame->DLC;
// add data bytes // add data bytes
for (j = 0; j < frame->DLC; j++) { for (j = 0; j < frame->DLC; j++)
{
buf[i++] = (frame->Data[j] >> 4); buf[i++] = (frame->Data[j] >> 4);
buf[i++] = (frame->Data[j] & 0x0F); buf[i++] = (frame->Data[j] & 0x0F);
} }
// convert to ASCII (2nd character to end) // convert to ASCII (2nd character to end)
for (j = 1; j < i; j++) { for (j = 1; j < i; j++)
{
if (buf[j] < 0xA) { if (buf[j] < 0xA) {
buf[j] += 0x30; buf[j] += 0x30;
} else { } else {
@ -63,12 +74,15 @@ int8_t slcan_parse_frame(uint8_t *buf, CanRxMsgTypeDef *frame) {
return i; return i;
} }
int8_t slcan_parse_str(uint8_t *buf, uint8_t len) {
int8_t slcan_parse_str(uint8_t *buf, uint8_t len)
{
CanTxMsgTypeDef frame; CanTxMsgTypeDef frame;
uint8_t i; uint8_t i;
// convert from ASCII (2nd character to end) // convert from ASCII (2nd character to end)
for (i = 1; i < len; i++) { for (i = 1; i < len; i++)
{
// lowercase letters // lowercase letters
if(buf[i] >= 'a') if(buf[i] >= 'a')
buf[i] = buf[i] - 'a' + 10; buf[i] = buf[i] - 'a' + 10;
@ -80,7 +94,8 @@ int8_t slcan_parse_str(uint8_t *buf, uint8_t len) {
buf[i] = buf[i] - '0'; buf[i] = buf[i] - '0';
} }
if (buf[0] == 'O') { if (buf[0] == 'O')
{
// open channel command // open channel command
can_enable(); can_enable();
return 0; return 0;
@ -92,7 +107,8 @@ int8_t slcan_parse_str(uint8_t *buf, uint8_t len) {
} else if (buf[0] == 'S') { } else if (buf[0] == 'S') {
// set bitrate command // set bitrate command
switch(buf[1]) { switch(buf[1])
{
case 0: case 0:
can_set_bitrate(CAN_BITRATE_10K); can_set_bitrate(CAN_BITRATE_10K);
break; break;
@ -128,7 +144,8 @@ int8_t slcan_parse_str(uint8_t *buf, uint8_t len) {
} else if (buf[0] == 'm' || buf[0] == 'M') { } else if (buf[0] == 'm' || buf[0] == 'M') {
// set mode command // set mode command
if (buf[1] == 1) { if (buf[1] == 1)
{
// mode 1: silent // mode 1: silent
can_set_silent(1); can_set_silent(1);
} else { } else {

View File

@ -1,60 +1,8 @@
/**
******************************************************************************
* File Name : stm32f0xx_hal_msp.c
* Date : 05/12/2014 20:22:27
* Description : This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
*
* COPYRIGHT(c) 2014 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f0xx_hal.h" #include "stm32f0xx_hal.h"
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void HAL_MspInit(void) void HAL_MspInit(void)
{ {
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
/* System interrupt init*/
/* SysTick_IRQn interrupt configuration */
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
} }
void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
@ -63,9 +11,6 @@ void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitTypeDef GPIO_InitStruct;
if(hcan->Instance==CAN) if(hcan->Instance==CAN)
{ {
/* USER CODE BEGIN CAN_MspInit 0 */
/* USER CODE END CAN_MspInit 0 */
/* Peripheral clock enable */ /* Peripheral clock enable */
__CAN_CLK_ENABLE(); __CAN_CLK_ENABLE();
@ -80,9 +25,6 @@ void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan)
GPIO_InitStruct.Alternate = GPIO_AF4_CAN; GPIO_InitStruct.Alternate = GPIO_AF4_CAN;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* USER CODE BEGIN CAN_MspInit 1 */
/* USER CODE END CAN_MspInit 1 */
} }
} }
@ -92,9 +34,6 @@ void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
if(hcan->Instance==CAN) if(hcan->Instance==CAN)
{ {
/* USER CODE BEGIN CAN_MspDeInit 0 */
/* USER CODE END CAN_MspDeInit 0 */
/* Peripheral clock disable */ /* Peripheral clock disable */
__CAN_CLK_DISABLE(); __CAN_CLK_DISABLE();
@ -104,14 +43,6 @@ void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan)
*/ */
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9);
/* USER CODE BEGIN CAN_MspDeInit 1 */
/* USER CODE END CAN_MspDeInit 1 */
} }
} }
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@ -1,81 +1,25 @@
/** //
****************************************************************************** // interrupts: handle global system interrupts
* @file stm32f0xx_it.c //
* @date 05/12/2014 20:22:27
* @brief Interrupt Service Routines.
******************************************************************************
*
* COPYRIGHT(c) 2014 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f0xx_hal.h" #include "stm32f0xx_hal.h"
#include "stm32f0xx.h" #include "stm32f0xx.h"
#include "stm32f0xx_it.h" #include "stm32f0xx_it.h"
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern PCD_HandleTypeDef hpcd_USB_FS; extern PCD_HandleTypeDef hpcd_USB_FS;
/******************************************************************************/
/* Cortex-M0 Processor Interruption and Exception Handlers */
/******************************************************************************/
/** // Handle USB interrupts
* @brief This function handles USB global Interrupt (combined with EXTI line 18).
*/
void USB_IRQHandler(void) void USB_IRQHandler(void)
{ {
/* USER CODE BEGIN USB_IRQn 0 */
/* USER CODE END USB_IRQn 0 */
HAL_PCD_IRQHandler(&hpcd_USB_FS); HAL_PCD_IRQHandler(&hpcd_USB_FS);
/* USER CODE BEGIN USB_IRQn 1 */
/* USER CODE END USB_IRQn 1 */
} }
/**
* @brief This function handles System tick timer. // Handle SysTick interrupt
*/
void SysTick_Handler(void) void SysTick_Handler(void)
{ {
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick(); HAL_IncTick();
HAL_SYSTICK_IRQHandler(); HAL_SYSTICK_IRQHandler();
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
} }
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/