generated from Template/H563ZI-HAL-CMake-Template
96 lines
2.7 KiB
C
96 lines
2.7 KiB
C
/* USER CODE BEGIN Header */
|
||
/**
|
||
******************************************************************************
|
||
* @file app_threadx.h
|
||
* @author MCD Application Team
|
||
* @brief ThreadX applicative header file
|
||
******************************************************************************
|
||
* @attention
|
||
*
|
||
* Copyright (c) 2025 STMicroelectronics.
|
||
* All rights reserved.
|
||
*
|
||
* This software is licensed under terms that can be found in the LICENSE file
|
||
* in the root directory of this software component.
|
||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||
*
|
||
******************************************************************************
|
||
*/
|
||
/* USER CODE END Header */
|
||
|
||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||
#ifndef __APP_THREADX_H
|
||
#define __APP_THREADX_H
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
/* Includes ------------------------------------------------------------------*/
|
||
#include "tx_api.h"
|
||
|
||
/* Private includes ----------------------------------------------------------*/
|
||
/* USER CODE BEGIN Includes */
|
||
#include "headfile.h"
|
||
/* USER CODE END Includes */
|
||
|
||
/* Exported types ------------------------------------------------------------*/
|
||
/* USER CODE BEGIN ET */
|
||
|
||
//extern MotorCommand current_motor_cmd;
|
||
/* USER CODE END ET */
|
||
|
||
/* Exported constants --------------------------------------------------------*/
|
||
/* USER CODE BEGIN EC */
|
||
|
||
/* USER CODE END EC */
|
||
|
||
/* Private defines -----------------------------------------------------------*/
|
||
|
||
/* USER CODE BEGIN PD */
|
||
// <20>¼<EFBFBD><C2BC><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>
|
||
#define EVENT_OBSTACLE_DETECTED 0x01
|
||
#define EVENT_GPS_DATA_READY 0x02
|
||
#define EVENT_BLE_COMMAND_RECEIVED 0x04
|
||
#define IMU_UPDATE_EVENT 0x08
|
||
#define EVENT_LOCATION_UPDATED 0x10
|
||
#define EVENT_IMU_DATA_READY 0x20 // <20><><EFBFBD><EFBFBD>IMU<4D><55><EFBFBD>ݾ<EFBFBD><DDBE><EFBFBD><EFBFBD>¼<EFBFBD>
|
||
|
||
#define TEST 1
|
||
extern TX_QUEUE ble_tx_queue;
|
||
extern TX_EVENT_FLAGS_GROUP system_events;
|
||
|
||
typedef struct
|
||
{
|
||
uint8_t msg_type; // 1=λ<><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,2=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||
char data[128];
|
||
}BLE_Message; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ <20><><EFBFBD>ݽṹ
|
||
|
||
/* USER CODE END PD */
|
||
|
||
/* Main thread defines -------------------------------------------------------*/
|
||
/* USER CODE BEGIN MTD */
|
||
|
||
/* USER CODE END MTD */
|
||
|
||
/* Exported macro ------------------------------------------------------------*/
|
||
/* USER CODE BEGIN EM */
|
||
|
||
/* USER CODE END EM */
|
||
|
||
/* Exported functions prototypes ---------------------------------------------*/
|
||
UINT App_ThreadX_Init(VOID *memory_ptr);
|
||
void MX_ThreadX_Init(void);
|
||
|
||
/* USER CODE BEGIN EFP */
|
||
|
||
/* USER CODE END EFP */
|
||
|
||
/* USER CODE BEGIN 1 */
|
||
|
||
/* USER CODE END 1 */
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
#endif /* __APP_THREADX_H */
|