A N 3 7 0
100
Rev. 1.0
/* Setup the STL encoding for none. No encode function therefore we
* leave the pointer at NULL. */
vStl_EncodeSetup( bEnc_NoneNrz_c, NULL );
/* Generate the frame to use. Example array is fixed in CODE
* as constant for this example. Assign the beginning of the array
* to the pbFrameHead pointer. */
pbFrameHead = (BYTE xdata *) abFCastDemo_FrameArray;
/* Setup frequency casting .. needed to be called once per boot */
vFCast_Setup();
/*------------------------------------------------------------------------------
* TRANSMISSION LOOP PHASE
*------------------------------------------------------------------------------
*/
/* Infinite loop here to continue tuning and transmitting a frame.
* only 1 frame is desired per button push this while loop could be
* eliminated and the vStl_PostLoop() could be followed by a call to
* vSys_Shutdown() */
while ( 1 )
{
/* Wait for a button press .. wait here in infinite loop for a button
* to be pushed or held. If not buttons are pushed then wait for button
* push. See the comment about vSys_Shutdown() above. */
while ( (0xdf == (P0 & 0xdf)) && (0x03 == (P1 & 0x03)) ) {}
/* Run at 433.46 MHz. Continue to tune frequency between frames.
* This is not absolutely necessary as the STL adjusts for temperature
* drift. It calculate values used by the vStl_SingleTxLoop() during
* transmission. Input is in [Hz]. Must be called at least once to tune. */
vFCast_Tune( 433460000.0 );
/* Call vFCast_FskAdj with the maximum FSK adjustment.
* 127 from the calculation spreadsheet */