Continuity and diode mode initial implementation
Reads continuity at a fixed ~100ohm or lower, and diodes with intelligent detection of LEDs vs normal diodes. Some values may need to be changed still.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
|
||||
#define ADC_CHANNELS 6
|
||||
#define ADC_CHANNELS 5
|
||||
#define ADC_HISTLEN 16
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ extern uint16_t adc_avg[ADC_CHANNELS];
|
||||
void adc_init();
|
||||
uint8_t adc_next();
|
||||
|
||||
void adc_switch0();
|
||||
|
||||
|
||||
|
||||
#endif /* _INC_ADC_H */
|
||||
21
include/probe.h
Normal file
21
include/probe.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* probe.c: helping you probe things
|
||||
*
|
||||
* file creation: 20231021 1717
|
||||
*/
|
||||
|
||||
#ifndef _INC_PROBE_H
|
||||
#define _INC_PROBE_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
void probe_mode_switch(uint8_t mode);
|
||||
|
||||
void probe_measure();
|
||||
|
||||
|
||||
|
||||
#endif /* _INC_PROBE_H */
|
||||
@@ -77,9 +77,9 @@
|
||||
|
||||
#define ADC_PROBE 1
|
||||
|
||||
#define ADC_VREF_INT 5
|
||||
#define ADC_VREF_INT 4
|
||||
#define ADC_VREF_EXT 0
|
||||
#define ADC_THERM 4
|
||||
// #define ADC_THERM 4
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,9 +4,33 @@
|
||||
* file creation: 20231016 1505
|
||||
*/
|
||||
|
||||
#ifndef _INC_USERIO_H
|
||||
#define _INC_USERIO_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
#define MODE_CONT 0
|
||||
#define MODE_CONT_TARGET 3072 // (4096 * (1 - (1 / 4)))
|
||||
|
||||
#define MODE_FUN 1
|
||||
#define MODE_FUN_TARGET 2731 // (4096 * (1 - (1 / 3)))
|
||||
|
||||
#define MODE_DIODE 2
|
||||
#define MODE_DIODE_TARGET 2048 // (4096 * 1 - ((1 / 2)))
|
||||
|
||||
|
||||
|
||||
extern uint8_t knob[2];
|
||||
|
||||
|
||||
|
||||
void userio_parse();
|
||||
|
||||
uint8_t userio_get_mode();
|
||||
|
||||
|
||||
|
||||
#endif /* _INC_USERIO_H */
|
||||
Reference in New Issue
Block a user