Push local changes for complete and functioning probe

This commit is contained in:
Adam Prochazka
2023-05-09 17:36:09 +02:00
parent 836ab547df
commit ea70f82c92
39 changed files with 8678 additions and 50419 deletions

View File

@ -4,16 +4,11 @@
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
* @author : Adam Prochazka <xproch0f>
******************************************************************************
* @attention
*
* Copyright (c) 2023 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.
*
* Code outside of "USER CODE" blocks was generated by STM32CubeMX by STMicroelectronics and was not written by the author.
******************************************************************************
*/
/* USER CODE END Header */
@ -62,6 +57,8 @@ extern "C" {
/* USER CODE END EM */
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
@ -70,28 +67,23 @@ void Error_Handler(void);
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
extern I2C_HandleTypeDef hi2c1;
#define MCO_Pin GPIO_PIN_0
#define MCO_GPIO_Port GPIOA
#define DEBUG_LED_Pin GPIO_PIN_1
#define DEBUG_LED_GPIO_Port GPIOA
#define VCP_TX_Pin GPIO_PIN_2
#define VCP_TX_GPIO_Port GPIOA
#define CHIP_SELECT_Pin GPIO_PIN_0
#define CHIP_SELECT_GPIO_Port GPIOB
#define VSET_LED_Pin GPIO_PIN_8
#define VSET_LED_GPIO_Port GPIOA
#define SWDIO_Pin GPIO_PIN_13
#define SWDIO_GPIO_Port GPIOA
#define SWCLK_Pin GPIO_PIN_14
#define SWCLK_GPIO_Port GPIOA
#define VCP_RX_Pin GPIO_PIN_15
#define VCP_RX_GPIO_Port GPIOA
#define LD3_Pin GPIO_PIN_3
#define LD3_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
extern I2C_HandleTypeDef hi2c1;
#define CDC_BUFF_SIZE 51200
#define CDC_FRAME_SIZE 64
#define CDC_FRAME_DELAY 1

View File

@ -76,9 +76,9 @@
#define HAL_SPI_MODULE_ENABLED
/*#define HAL_SRAM_MODULE_ENABLED */
/*#define HAL_SWPMI_MODULE_ENABLED */
/*#define HAL_TIM_MODULE_ENABLED */
#define HAL_TIM_MODULE_ENABLED
/*#define HAL_TSC_MODULE_ENABLED */
#define HAL_UART_MODULE_ENABLED
/*#define HAL_UART_MODULE_ENABLED */
/*#define HAL_USART_MODULE_ENABLED */
/*#define HAL_WWDG_MODULE_ENABLED */
/*#define HAL_EXTI_MODULE_ENABLED */

View File

@ -58,7 +58,6 @@ void SysTick_Handler(void);
void DMA1_Channel2_IRQHandler(void);
void DMA1_Channel3_IRQHandler(void);
void SPI1_IRQHandler(void);
void USART2_IRQHandler(void);
void USB_IRQHandler(void);
/* USER CODE BEGIN EFP */

View File

@ -1,4 +1,15 @@
/*
/**
******************************************************************************
* @file : tusb_config.h
* @brief : Configuration file for USB communication.
* @author : Adam Prochazka <xproch0f>
******************************************************************************
* @attention
*
* File was from the large part taken from the TinyUSB repository and just slightly configured for projects usecase.
* Original file contains this disclaimer:
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,6 +1,7 @@
/**
* @file vl53l1_platform.h
* @brief Those platform functions are platform dependent and have to be implemented by the user
* @brief Large portion of this file was taken and edited from the VL53L1 Platform.
* @author Adam Prochazka <xproch0f>
*/
#ifndef _VL53L1_PLATFORM_H_
@ -19,66 +20,74 @@ typedef struct {
typedef VL53L1_Dev_t *VL53L1_DEV;
/** @brief VL53L1_WriteMulti() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_WriteMulti() definition.
*/
int8_t VL53L1_WriteMulti(
uint16_t dev,
uint16_t index,
uint8_t *pdata,
uint32_t count);
/** @brief VL53L1_ReadMulti() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_ReadMulti() definition.
*/
int8_t VL53L1_ReadMulti(
uint16_t dev,
uint16_t index,
uint8_t *pdata,
uint32_t count);
/** @brief VL53L1_WrByte() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_WrByte() definition.
*/
int8_t VL53L1_WrByte(
uint16_t dev,
uint16_t index,
uint8_t data);
/** @brief VL53L1_WrWord() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_WrWord() definition.
*/
int8_t VL53L1_WrWord(
uint16_t dev,
uint16_t index,
uint16_t data);
/** @brief VL53L1_WrDWord() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_WrDWord() definition.
*/
int8_t VL53L1_WrDWord(
uint16_t dev,
uint16_t index,
uint32_t data);
/** @brief VL53L1_RdByte() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_RdByte() definition.
*/
int8_t VL53L1_RdByte(
uint16_t dev,
uint16_t index,
uint8_t *pdata);
/** @brief VL53L1_RdWord() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_RdWord() definition.
*/
int8_t VL53L1_RdWord(
uint16_t dev,
uint16_t index,
uint16_t *pdata);
/** @brief VL53L1_RdDWord() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_RdDWord() definition.
*/
int8_t VL53L1_RdDWord(
uint16_t dev,
uint16_t index,
uint32_t *data);
/** @brief VL53L1_WaitMs() definition.\n
* To be implemented by the developer
/**
* @brief VL53L1_WaitMs() definition.
*/
int8_t VL53L1_WaitMs(
uint16_t dev,