ANT/Library for LPC1114
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[ANT]]
* Library for LPC1114 [#a440fa7b]
>
This is a sample code of the library for LPC1114, a 32bit...
>
This library is still alpha version, and there is possibl...
>
ant.c calls functions listed at uart.c. The functions are...
>>
For uart.c and uart.h, their licenses are checking right...
>
- header file &ref(ant.h);~
- C source file &ref(ant.c);~
** Example [#n9172ee0]
>
#include <ant.h>
#include <uart.h>
#define DEVICE_NUMBER 31
#define MAX_BUFSIZE 32
#define ANT_CH 0
unsigned char buffer[MAX_BUFSIZE];
void OpenANT() {
// This function sets the communication parameter 0 and...
ANT_ResetSystem(); ...
ANT_AssignChannel( ANT_CH, ANT_Bidirectional_Slave, 0) ;...
ANT_SetChannelId( ANT_CH, DEVICE_NUMBER, 1, 1 ); ...
ANT_SetChannelPeriod_Hz( ANT_CH, 4 ); ...
ANT_SetChannelRFFreq( ANT_CH, 4 ); ...
ANT_OpenChannel( ANT_CH ); ...
return;
}
void main () {
int s;
OpenANT();
while(1) {
if ( s = BC_ANT_RecvPacket( buffer, MAX_BUFSIZE )...
// Receiving data from the ANT chip, and proc...
// Receiving packets, and processing events, ...
}
}
}
* Revision History [#bbddba0e]
>
- 2013/02/01 This article is initially uploaded
End:
[[ANT]]
* Library for LPC1114 [#a440fa7b]
>
This is a sample code of the library for LPC1114, a 32bit...
>
This library is still alpha version, and there is possibl...
>
ant.c calls functions listed at uart.c. The functions are...
>>
For uart.c and uart.h, their licenses are checking right...
>
- header file &ref(ant.h);~
- C source file &ref(ant.c);~
** Example [#n9172ee0]
>
#include <ant.h>
#include <uart.h>
#define DEVICE_NUMBER 31
#define MAX_BUFSIZE 32
#define ANT_CH 0
unsigned char buffer[MAX_BUFSIZE];
void OpenANT() {
// This function sets the communication parameter 0 and...
ANT_ResetSystem(); ...
ANT_AssignChannel( ANT_CH, ANT_Bidirectional_Slave, 0) ;...
ANT_SetChannelId( ANT_CH, DEVICE_NUMBER, 1, 1 ); ...
ANT_SetChannelPeriod_Hz( ANT_CH, 4 ); ...
ANT_SetChannelRFFreq( ANT_CH, 4 ); ...
ANT_OpenChannel( ANT_CH ); ...
return;
}
void main () {
int s;
OpenANT();
while(1) {
if ( s = BC_ANT_RecvPacket( buffer, MAX_BUFSIZE )...
// Receiving data from the ANT chip, and proc...
// Receiving packets, and processing events, ...
}
}
}
* Revision History [#bbddba0e]
>
- 2013/02/01 This article is initially uploaded
Page: