10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>Periodic Interrupt Timer FunctionsPITAddChore -- Add a periodic interrupt choreDescription:Prototype:Inputs:Returns:Notes:This function adds a chore to the list of chores to be executed at the interval specified witheither: PITSet100usPeriod or PITSet51msPeriod.bool PITAddChore(vfptr chore, ushort intReqLevel);chore is a volatile function pointer to the chore to be installedintReqLevel is the interrupt request level that you wish your chore to be run at. It will never behigher than the level at which the PIT was initialized.Returns TRUE if the chore was successfully added to the list.These chores should be kept fairly short. A good rule of thumb is to keep all of the chores to acombined maximum duration of 100µs. This chore is executed in an interrupt so the standardinterrupt guidelines apply with regards to execution speed. The interrupt request level you passto this function is the interrupt request level you wish the chore to be executed at. However, thechore will never execute at a higher priority than the PIT was initialized at.PITInit -- Initialize the periodic interrupt timerDescription:Prototype:This function is generally called automatically by the operating system before your programruns, though in special cases, you may override the OS and sequence the initialization processyourself (see Startup). This function lays all the groundwork for the Periodic Interrupt timer butdoes not start the timer or install any chores.void PITInit(ushort intReqLevel);Inputs: intReqLevel is the interrupt request level (0-7) that the PIT will run at. (Default is 3)PITPeriod -- Return PIT period setting in microseconds, zero if offDescription:Prototype:Inputs:Returns:Return PIT period setting in microseconds, zero if offulong PITPeriod(void);NothingPIT period in microseconds or zero if the PIT is offPITRemoveChore -- Remove a periodic interrupt chore (NULL vfptr for all)Description:Prototype:Inputs:Returns:This function removes a chore from the PIT chore list that was perviously added by thePITAddChore function. Pass NULL (zero) for the chore parameter to remove all PIT chores.bool PITRemoveChore(vfptr chore);chore is a pointer to a function that was installed with the PITAddChore function.Returns TRUE if the chore was successfully removed.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.25 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!