kb_lrf.h File Reference

This graph shows which files directly or indirectly include this file:

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]


Function Documentation

void kb_lrf_Close ( int  LRF_DeviceHandle  ) 

kb_lrf_Close does powering off the LRF, the close the port device

Parameters:
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().

Here is the call graph for this function:

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,

Parameters:
LRF_DeviceHandle Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init
Returns:
- < 0 : Any error code
  • 0 : Sucess

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().

Here is the call graph for this function:

int kb_lrf_Init ( char *  LRF_DeviceName  ) 

kb_lrf_Init does openning port, turn power on the LRF then certify the link,

Returns:
- < 0 : Any error code
  • > 0 : Handle to the device

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().

Here is the call graph for this function:


Variable Documentation

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().


Generated on Wed Dec 15 11:49:28 2010 for KoreBot Library by  doxygen 1.5.5