EasyManua.ls Logo

FriendlyARM Tiny210 - LED Apis; PWM Apis; ADC Apis; EEPROM Apis

Default Icon
252 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Address: Room 1705,Block A1, Longyuan Plaza, Longkouxi Road, Guangzhou, China, 510640 Website: http://www.arm9.net
Sales: +86-20-85201025 Tech Support: +86-13719442657 Fax: +86-20-85261505
Email for Business and Cooperation: capbily@163.com Email for Tech Support: dev_friendlyarm@163.com
- 180 -
6.2.2.2 LED APIs
LED APIs:
APIs
Parameters and Return Value
Comment
int setLedState(
int ledID,
int ledState )
ledID LED you want to access (0~3)
ledState: 1 is on0 is off
Return Value:
If this operation succeeds it will return 0
otherwise it will return -1
Open an LED
6.2.2.3 PWM APIs
PWM Buzzer APIs:
APIs
Parameters and Return Value
Comment
int PWMPlay(int frequency);
frequency: frequency of sound
Return Value:
If this operation succeeds it will return 0
otherwise it will return -1
Play a Buzzer with the specified
frequency
int PWMStop();
Return Value:
If this operation succeeds it will return 0
otherwise it will return -1
Stop a buzzer
6.2.2.4 ADC APIs
ADC APIs:
APIs
Parameters and Return Value
Comment
int readADC()
Return Value:
If this operation succeeds it will return
the conversion result otherwise it will
return -1
Read an ADC conversion result
6.2.2.5 EEPROM APIs
EEPROM APIs:
APIs
Parameters and Return Value
Comment
int openI2CDevice();
Return Value:
If this operation succeeds it will return a file
descriptor otherwise it will return -1.
Open an IIC device and return a file
descriptor. After an IIC device is opened
successfully you can call
writeByteDataToI2C and
readByteDataFromI2C to operator the
EEPROM.
int writeByteDataToI2C(
fd: file descriptor
Write data to EEPROM (one byte on each

Table of Contents

Related product manuals