Go to the source code of this file.
Functions | |
int | kb_lrf_Init (char *LRF_DeviceName) |
int | kb_lrf_GetDistances (int LRF_DeviceHandle) |
void | kb_lrf_Close (int LRF_DeviceHandle) |
Variables | |
unsigned short | kb_lrf_DistanceData [121] |
void kb_lrf_Close | ( | int | LRF_DeviceHandle | ) |
kb_lrf_Close does powering off the LRF, the close the port device
LRF_DeviceHandle | Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init |
Definition at line 720 of file kb_lrf.c.
References kb_lrf_pwrOff().
Referenced by handle_kill().
int kb_lrf_GetDistances | ( | int | LRF_DeviceHandle | ) |
kb_lrf_GetDistances is a high level function that does whole mechanism certify the link, get some distances, averages then receive back the data from LRF,
LRF_DeviceHandle | Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init |
Definition at line 787 of file kb_lrf.c.
References DISTANCE_READINGS_TO_AVERAGE, KB_ERROR, KB_ERROR_LRFNOCERT, kb_lrf_AcquireCertifiedCode(), kb_lrf_CertifyLink(), kb_lrf_DistanceData, kb_lrf_DistanceDataSensor, kb_lrf_DistanceDataSum, kb_lrf_DistanceGoodCounter, and kb_lrf_FetchDistanceFromLRF().
Referenced by koa_lrf_task(), and lrfmeasure().
int kb_lrf_Init | ( | char * | LRF_DeviceName | ) |
kb_lrf_Init does openning port, turn power on the LRF then certify the link,
Definition at line 669 of file kb_lrf.c.
References KB_ERROR, KB_ERROR_OPENLRF, kb_gpio_dir(), kb_gpio_function(), kb_gpio_init(), kb_init(), kb_lrf_AcquireCertifiedCode(), kb_lrf_CertifyLink(), kb_lrf_OpenComPort(), kb_lrf_pwrOn(), OUT, and PXA_INT0.
Referenced by koa_lrf_task(), lrfinit(), and lrfmeasure().
unsigned short kb_lrf_DistanceData[121] |
Definition at line 80 of file kb_lrf.c.
Referenced by kb_lrf_GetDistances(), koa_lrf_task(), and lrfmeasure().