Skip to content

Commit

Permalink
fixes #268: ADC for STM8L151 and other STM8L MHD devices
Browse files Browse the repository at this point in the history
  • Loading branch information
TG9541 committed Aug 28, 2020
1 parent aac8e9d commit 0863543
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions inc/stm8_adc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
; ADC! ( c -- )
; Init ADC, select channel for conversion

.ifeq (TARGET - STM8L051F3)
; ADC for L051F3
.ifeq (FAMILY - STM8L)

; ADC for the STM8L family

; RI settings for analog signal routing should be done
; on the board configuration level

HEADER ADCSTOR "ADC!"
ADCSTOR:
BSET CLK_PCKENR2,#0 ; enable clock for ADC
Expand Down Expand Up @@ -54,6 +59,8 @@ ADCAT:

.else

; ADC for the STM8S family

; ADC! ( c -- )
; Init ADC, select channel for conversion

Expand Down

0 comments on commit 0863543

Please sign in to comment.