{
SIM_DESC sd = hw_system (me);
struct mn103ser *serial = hw_data(me);
- long serial_reg = (long) data;
+ long serial_reg = (uintptr_t) data;
char c;
int count, status;
/* Schedule next polling event */
serial->device[serial_reg].event
= hw_event_queue_schedule (me, 1000,
- do_polling_event, (void *)serial_reg);
+ do_polling_event, (void *)(uintptr_t)serial_reg);
}
serial->device[serial_reg].event
= hw_event_queue_schedule (me, 1000,
do_polling_event,
- (void *) (long) serial_reg);
+ (void *)(uintptr_t)serial_reg);
}
if ( nr_bytes == 1 )
void *data)
{
struct mn103tim *timers = hw_data(me);
- long timer_nr = (long) data;
+ long timer_nr = (uintptr_t) data;
int next_timer;
/* Check if counting is still enabled. */
/* FIX: Check if div_ratio has changed and if it's now 0. */
timers->timer[timer_nr].event
= hw_event_queue_schedule (me, timers->timer[timer_nr].div_ratio,
- do_counter_event, (void *)timer_nr);
+ do_counter_event, (void *)(uintptr_t)timer_nr);
}
else
{
void *data)
{
struct mn103tim *timers = hw_data(me);
- long timer_nr = (long) data;
+ long timer_nr = (uintptr_t) data;
int next_timer;
/* Check if counting is still enabled. */
/* FIX: Check if div_ratio has changed and if it's now 0. */
timers->timer[timer_nr].event
= hw_event_queue_schedule (me, timers->timer[timer_nr].div_ratio,
- do_counter6_event, (void *)timer_nr);
+ do_counter6_event, (void *)(uintptr_t)timer_nr);
}
else
{
timers->timer[timer_nr].event
= hw_event_queue_schedule(me, div_ratio,
do_counter_event,
- (void *)(timer_nr));
+ (void *)(uintptr_t)timer_nr);
}
}
}
timers->timer[timer_nr].event
= hw_event_queue_schedule(me, div_ratio,
do_counter6_event,
- (void *)(timer_nr));
+ (void *)(uintptr_t)timer_nr);
}
}
else