hdo  beta
Funkce
Dokumentace souboru /home/mrazik/Documents/web/old/hdo/at91lib/peripherals/pit/pit.h

Zobrazit zdrojový text tohoto souboru.

Funkce

void PIT_Init (unsigned int period, unsigned int pit_frequency)
void PIT_SetPIV (unsigned int piv)
 Set the PIT Periodic Interval Value.
void PIT_Enable (void)
 Enable the PIT.
void PIT_EnableIT (void)
 Enable PIT periodic interrupt.
void PIT_DisableIT (void)
 Disable PIT periodic interrupt.
unsigned int PIT_GetMode (void)
 Read PIT mode register.
unsigned int PIT_GetStatus (void)
 Read PIT status register.
unsigned int PIT_GetPIIR (void)
 Read PIT CPIV and PICNT without ressetting the counters.
unsigned int PIT_GetPIVR (void)
 Read System timer CPIV and PICNT without ressetting the counters.

Detailní popis

Purpose

Configuration and handling of PIT.

Usage

  1. Initialize System timer for a period in �second with PIT_Init
  2. Set the PIT Periodic Interval Value with PIT_SetPIV
  3. Enable the PIT with PIT_Enable
  4. Enable & disable PIT interrupts using PIT_EnableInt and PIT_DisableInt
  5. Read PIT mode register PIT_GetMode
  6. Read PIT status register PIT_GetStatus
  7. Read PIT CPIV and PICNT without ressetting the counters PIT_GetPIIR
  8. Read System timer CPIV and PICNT without ressetting the counters PIT_GetPIVR

Definice v souboru pit.h.


Dokumentace funkcí

void PIT_Init ( unsigned int  period,
unsigned int  pit_frequency 
)

Initialize the System timer for a period in second with a system clock freq in MHz

Parametry:
periodPeriod in second.
pit_frequencySystem clock frequency in MHz.

Definice je uvedena na řádku 46 v souboru pit.c.