![FriendlyARM Mini210S User Manual Download Page 180](http://html1.mh-extra.com/html/friendlyarm/mini210s/mini210s_user-manual_2333466180.webp)
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:
Email for Tech Support: [email protected]
第
- 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 on
,
0 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