Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/isci/isci_timer.c
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
scif_cb_timer_start(SCI_CONTROLLER_HANDLE_T controller, void *timer, | scif_cb_timer_start(SCI_CONTROLLER_HANDLE_T controller, void *timer, | ||||
uint32_t milliseconds) | uint32_t milliseconds) | ||||
{ | { | ||||
struct ISCI_TIMER *isci_timer = (struct ISCI_TIMER *)timer; | struct ISCI_TIMER *isci_timer = (struct ISCI_TIMER *)timer; | ||||
isci_timer->is_started = TRUE; | isci_timer->is_started = TRUE; | ||||
isci_log_message(3, "TIMER", "start %p %d\n", timer, milliseconds); | isci_log_message(3, "TIMER", "start %p %d\n", timer, milliseconds); | ||||
callout_reset(&isci_timer->callout, (milliseconds * hz)/1000, | callout_reset_sbt(&isci_timer->callout, SBT_1MS * milliseconds, 0, | ||||
isci_timer_timeout, timer); | isci_timer_timeout, timer, 0); | ||||
} | } | ||||
/** | /** | ||||
* @brief This callback method asks the user to stop the supplied timer. | * @brief This callback method asks the user to stop the supplied timer. | ||||
* | * | ||||
* @param[in] controller This parameter specifies the controller with | * @param[in] controller This parameter specifies the controller with | ||||
* which this timer is to associated. | * which this timer is to associated. | ||||
* @param[in] timer This parameter specifies the timer to be stopped. | * @param[in] timer This parameter specifies the timer to be stopped. | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |