Update repo
This commit is contained in:
1 parent
0afe39c8fe
commit
d229fd964d
6 files changed
+9
-28
No files matched your search
@@ -6,7 +6,6 @@
|
||||
#include <zephyr/drivers/uart.h>
|
||||
#include <zephyr/drivers/adc.h>
|
||||
|
||||
|
||||
#define ADC_NODE DT_NODELABEL(adc1)
|
||||
|
||||
#if !DT_NODE_HAS_STATUS(ADC_NODE, okay)
|
||||
@@ -19,7 +18,6 @@ static const struct device *const adc_dev =
|
||||
static uint16_t sample;
|
||||
|
||||
// Channels Configuration: PA1(IN1), PA4(IN4), PB0(IN8)
|
||||
|
||||
static struct adc_channel_cfg ch1_cfg = {
|
||||
.gain = ADC_GAIN_1,
|
||||
.reference = ADC_REF_INTERNAL,
|
||||
@@ -69,9 +67,8 @@ static int read_one(uint8_t ch, uint16_t *out) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int main(void) {
|
||||
|
||||
if(!device_is_ready(adc_dev)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user