Exemplo n.º 1
0
/* ===================================================================*/
LDD_TError TU1_Enable(LDD_TDeviceData *DeviceDataPtr)
{
  TU1_TDeviceData *DeviceDataPrv = (TU1_TDeviceData *)DeviceDataPtr;

  TPM_PDD_SelectPrescalerSource(TPM0_BASE_PTR, DeviceDataPrv->Source); /* Enable the device */
  return ERR_OK;
}
Exemplo n.º 2
0
static void StartTimer(void) {
  TPM_PDD_InitializeCounter(TPM0_DEVICE); /* reset timer counter */
  TPM_PDD_SelectPrescalerSource(TPM0_DEVICE, TPM_PDD_SYSTEM); /* enable timer so I can reset the value below */
}
Exemplo n.º 3
0
static void StopTimer(void) {
  /* set CMOD of SC register to zero to disable timer */
  TPM_PDD_SelectPrescalerSource(TPM0_DEVICE, TPM_PDD_DISABLED); /* disable timer */
}
Exemplo n.º 4
0
/* ===================================================================*/
LDD_TError TU2_Disable(LDD_TDeviceData *DeviceDataPtr)
{
  (void)DeviceDataPtr;                 /* Parameter is not used, suppress unused argument warning */
  TPM_PDD_SelectPrescalerSource(TPM1_BASE_PTR, TPM_PDD_DISABLED);
  return ERR_OK;
}