File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
targets/TARGET_TOSHIBA/TARGET_TMPM066 Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -79,18 +79,13 @@ uint32_t us_ticker_read(void)
79
79
80
80
void us_ticker_set_interrupt (timestamp_t timestamp )
81
81
{
82
- int delta = 0 ;
82
+ uint32_t delta = 0 ;
83
83
84
84
// Stops and clear count operation
85
85
TSB_T16A1 -> RUN = TMR16A_STOP ;
86
86
TSB_T16A1 -> CR = TMR16A_SYSCK ;
87
87
// Set the compare register
88
- delta = (int )(timestamp - us_ticker_read ());
89
- if (delta < 0 ) {
90
- // Ticker interrupt handle
91
- us_ticker_irq_handler ();
92
- return ;
93
- }
88
+ delta = (timestamp - us_ticker_read ());
94
89
TSB_T16A1 -> RG = delta ;
95
90
// Set Interrupt
96
91
NVIC_EnableIRQ (INT16A1_IRQn );
@@ -110,5 +105,5 @@ void us_ticker_disable_interrupt(void)
110
105
111
106
void us_ticker_clear_interrupt (void )
112
107
{
113
- NVIC_ClearPendingIRQ ( INT16A1_IRQn );
108
+ //no flags to clear
114
109
}
You can’t perform that action at this time.
0 commit comments