Compare commits
No commits in common. "2187c1a712bed65ea878ac832c28bf4e4638fddf" and "04389b1df640ddc53a499df0fc2fd578734693b2" have entirely different histories.
2187c1a712
...
04389b1df6
@ -34,35 +34,15 @@
|
||||
*/
|
||||
#define ADC_PT1000_CHANNEL 2U
|
||||
|
||||
/**
|
||||
* @brief GPIO Port the ADC converter for the PT1000 measurement is connected to
|
||||
*/
|
||||
#define ADC_PT1000_PORT GPIOA
|
||||
|
||||
/**
|
||||
* @brief The clock enable mask of the RCC register for ADC_PT1000_PORT
|
||||
*/
|
||||
#define ADC_PT1000_PORT_RCC_MASK RCC_AHB1ENR_GPIOAEN
|
||||
|
||||
/**
|
||||
* @brief The GPIO pin number the PT1000 analog voltage is connected to
|
||||
*/
|
||||
#define ADC_PT1000_PIN 2U
|
||||
|
||||
/**
|
||||
* @brief The cycle count the moving average filter is labeled 'instable' after startup of the measurement or changing
|
||||
* the alpha value @ref ADC_PT1000_FILTER_WEIGHT
|
||||
*/
|
||||
#define ADC_FILTER_STARTUP_CYCLES 800U
|
||||
|
||||
/**
|
||||
* @brief The delay value programmed into the sample timer
|
||||
*/
|
||||
#define ADC_PT1000_SAMPLE_CNT_DELAY 1000U
|
||||
|
||||
/**
|
||||
* @brief The amount of samples to take to prefilter the analog signal
|
||||
*/
|
||||
#define ADC_PT1000_DMA_AVG_SAMPLES 6U
|
||||
|
||||
/**
|
||||
@ -164,14 +144,8 @@ void adc_pt1000_convert_raw_value_array_to_resistance(float *resistance_dest, fl
|
||||
*/
|
||||
enum adc_pt1000_error adc_pt1000_check_error();
|
||||
|
||||
/**
|
||||
* @brief Clear the error status of the PT1000 measurement
|
||||
*/
|
||||
void adc_pt1000_clear_error();
|
||||
|
||||
/**
|
||||
* @brief Disable the PT1000 measurement
|
||||
*/
|
||||
void adc_pt1000_disable();
|
||||
|
||||
#endif // __ADCMEAS_H__
|
||||
|
@ -21,55 +21,19 @@
|
||||
#ifndef __BUTTON_H__
|
||||
#define __BUTTON_H__
|
||||
|
||||
/**
|
||||
* @brief GPIO Port the button is connected to
|
||||
*/
|
||||
#define BUTTON_PORT GPIOD
|
||||
|
||||
/**
|
||||
* @brief The RCC clock mask for @ref BUTTON_PORT
|
||||
*/
|
||||
#define BUTTON_RCC_MASK RCC_AHB1ENR_GPIODEN
|
||||
|
||||
/**
|
||||
* @brief The GPIO pin number the button is connected to
|
||||
*/
|
||||
#define BUTTON_PIN 4
|
||||
|
||||
/**
|
||||
* @brief The time in ms the button has to stay pressed to be detected as a short press
|
||||
*/
|
||||
#define BUTTON_SHORT_ON_TIME_MS 50UL
|
||||
|
||||
/**
|
||||
* @brief Time in ms the button has to be pressed to be counted as a long press
|
||||
*/
|
||||
#define BUTTON_LONG_ON_TIME_MS 400UL
|
||||
|
||||
|
||||
#if BUTTON_LONG_ON_TIME_MS <= BUTTON_SHORT_ON_TIME_MS
|
||||
#error "Button BUTTON_SHORT_ON_TIME_MS time has to be shorter than BUTTON_LONG_ON_TIME_MS"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief States the puhsbutton of the rotary encoder can be in
|
||||
*/
|
||||
enum button_state {BUTTON_IDLE = 0, BUTTON_SHORT_RELEASED, BUTTON_LONG_RELEASED, BUTTON_SHORT, BUTTON_LONG};
|
||||
|
||||
/**
|
||||
* @brief Init the push button
|
||||
*/
|
||||
void button_init();
|
||||
|
||||
/**
|
||||
* @brief read if a push button event occured
|
||||
* @return Button event
|
||||
*/
|
||||
enum button_state button_read_event();
|
||||
|
||||
/**
|
||||
* @brief button_deinit
|
||||
*/
|
||||
void button_deinit();
|
||||
|
||||
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#define LCD_CHAR_WIDTH 16
|
||||
|
||||
static void lcd_port_clear(void)
|
||||
{
|
||||
LCD_DPORT->ODR &= ~(LCD_E_MASK);
|
||||
@ -423,7 +421,7 @@ enum lcd_fsm_ret lcd_fsm_write_buffer(const char (*display_buffer)[21])
|
||||
lcd_fsm_enable(false);
|
||||
ret = LCD_FSM_WAIT_CALL;
|
||||
char_cnt++;
|
||||
if (char_cnt < LCD_CHAR_WIDTH) {
|
||||
if (char_cnt < 16) {
|
||||
state_cnt = 5;
|
||||
} else {
|
||||
state_cnt = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user