forked from nanoframework/nf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ADC in STM32F769I DISCO (nanoframework#658)
- Loading branch information
1 parent
8669d8b
commit 7dbdb92
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/target_windows_devices_adc_config.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Copyright (c) 2018 The nanoFramework project contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
#include "win_dev_adc_native.h" | ||
|
||
////////// | ||
// ADC1 // | ||
////////// | ||
|
||
const NF_PAL_ADC_PORT_PIN_CHANNEL Adc1PortPinConfig[] = { | ||
{GPIOA, 6, ADC_CHANNEL_IN6}, | ||
{GPIOA, 4, ADC_CHANNEL_IN4}, | ||
{GPIOC, 2, ADC_CHANNEL_IN12}, | ||
{GPIOF, 10, ADC_CHANNEL_IN8}, | ||
{NULL, NULL, ADC_CHANNEL_SENSOR}, | ||
{NULL, NULL, ADC_CHANNEL_VREFINT}, | ||
{NULL, NULL, ADC_CHANNEL_VBAT}, | ||
}; | ||
|
||
const int Adc1ChannelCount = ARRAYSIZE(Adc1PortPinConfig); | ||
|
||
////////// | ||
// ADC3 // | ||
////////// | ||
|
||
const NF_PAL_ADC_PORT_PIN_CHANNEL Adc3PortPinConfig[] = { | ||
{GPIOF, 8, ADC_CHANNEL_IN6}, | ||
{GPIOB, 8, ADC_CHANNEL_IN7}, | ||
}; | ||
|
||
const int Adc3ChannelCount = ARRAYSIZE(Adc3PortPinConfig); |