Fujitsu SK-AMAPOLLO-BASE-V11 사용자 설명서 - 페이지 21

{카테고리_이름} Fujitsu SK-AMAPOLLO-BASE-V11에 대한 사용자 설명서을 온라인으로 검색하거나 PDF를 다운로드하세요. Fujitsu SK-AMAPOLLO-BASE-V11 46 페이지. Ambiq micro apollo 1 / 2 evaluation board

Fujitsu SK-AMAPOLLO-BASE-V11 사용자 설명서

2.7.2 Using ADC

Digital IOs are available as A0...5.
The Naming is: ARDUINO_A<n>
Start with the FEEU MCU Temlate for Apollo 1 or Apollo 2. Enable GPIO FEEU Low-Level-
Driver for Apollo in RTE_Device.h (in example\source\config):
#define APOLLOADC_ENABLED 1
#define APOLLOGPIO_ENABLED 1
Add apollogpio.c and apolloadc.c to your project and include apolloadc.h and
skamapollobase.h in you C-file. Following code gives an example how to poll the ADC:
#include "mcu.h"
#include "skamapollobase.h"
#include "apolloadc.h"
int main(void)
{
float32_t f32AdcValue = 0.0f;
while(1)
{
f32AdcValue = ApolloAdc_SimpleReadByPin(ARDUINO_A0);
}
}
© Fujitsu Electronics Europe GmbH
FEEU Ultra-Low-Power Apollo Evaluation Kit Platform
Chapter 2 Using the Hardware
- 21 -
EEU-UG-2017120001-10