mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
commit
c5737312c2
@ -210,7 +210,10 @@ void hwtimer_arch_set_absolute(unsigned long value, short timer)
|
|||||||
{
|
{
|
||||||
DEBUG("hwtimer_arch_set_absolute(%lu, %i)\n", value, timer);
|
DEBUG("hwtimer_arch_set_absolute(%lu, %i)\n", value, timer);
|
||||||
value -= native_hwtimer_now;
|
value -= native_hwtimer_now;
|
||||||
return(hwtimer_arch_set(value, timer));
|
|
||||||
|
hwtimer_arch_set(value, timer);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long hwtimer_arch_now(void)
|
unsigned long hwtimer_arch_now(void)
|
||||||
|
@ -52,7 +52,7 @@ void eINT(void);
|
|||||||
/**
|
/**
|
||||||
* register interrupt handler handler for interrupt sig
|
* register interrupt handler handler for interrupt sig
|
||||||
*/
|
*/
|
||||||
int register_interrupt(int sig, void *handler);
|
int register_interrupt(int sig, void (*handler)(void));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* unregister interrupt handler for interrupt sig
|
* unregister interrupt handler for interrupt sig
|
||||||
|
@ -358,7 +358,7 @@ void native_isr_entry(int sig, siginfo_t *info, void *context)
|
|||||||
* TODO: use appropriate data structure for signal
|
* TODO: use appropriate data structure for signal
|
||||||
* handlers.
|
* handlers.
|
||||||
*/
|
*/
|
||||||
int register_interrupt(int sig, void *handler)
|
int register_interrupt(int sig, void (*handler)(void))
|
||||||
{
|
{
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
DEBUG("XXX: register_interrupt()\n");
|
DEBUG("XXX: register_interrupt()\n");
|
||||||
@ -369,8 +369,7 @@ int register_interrupt(int sig, void *handler)
|
|||||||
|
|
||||||
native_irq_handlers[sig].func = handler;
|
native_irq_handlers[sig].func = handler;
|
||||||
|
|
||||||
sa.sa_sigaction = (void *) native_isr_entry;
|
sa.sa_sigaction = native_isr_entry;
|
||||||
/* sa.sa_handler = (void*) native_isr_entry; */
|
|
||||||
|
|
||||||
if (sigemptyset(&sa.sa_mask) == -1) {
|
if (sigemptyset(&sa.sa_mask) == -1) {
|
||||||
err(1, "register_interrupt: sigemptyset");
|
err(1, "register_interrupt: sigemptyset");
|
||||||
@ -402,7 +401,6 @@ int unregister_interrupt(int sig)
|
|||||||
|
|
||||||
native_irq_handlers[sig].func = NULL;
|
native_irq_handlers[sig].func = NULL;
|
||||||
|
|
||||||
/* sa.sa_sigaction = SIG_IGN; */
|
|
||||||
sa.sa_handler = SIG_IGN;
|
sa.sa_handler = SIG_IGN;
|
||||||
|
|
||||||
if (sigemptyset(&sa.sa_mask) == -1) {
|
if (sigemptyset(&sa.sa_mask) == -1) {
|
||||||
@ -437,7 +435,7 @@ void native_interrupt_init(void)
|
|||||||
native_irq_handlers[i].func = NULL;
|
native_irq_handlers[i].func = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sa.sa_sigaction = (void *) native_isr_entry;
|
sa.sa_sigaction = native_isr_entry;
|
||||||
|
|
||||||
if (sigemptyset(&sa.sa_mask) == -1) {
|
if (sigemptyset(&sa.sa_mask) == -1) {
|
||||||
err(1, "native_interrupt_init: sigemptyset");
|
err(1, "native_interrupt_init: sigemptyset");
|
||||||
|
@ -106,7 +106,7 @@ void nativenet_switch_to_rx()
|
|||||||
/* nativenet_internal.h *************************************************/
|
/* nativenet_internal.h *************************************************/
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
int _nativenet_register_cb(int event, void *func)
|
int _nativenet_register_cb(int event, void (*func)(void))
|
||||||
{
|
{
|
||||||
if (event > NNEV_MAXEV) {
|
if (event > NNEV_MAXEV) {
|
||||||
DEBUG("_nativenet_register_cb: event > NNEV_MAXEV");
|
DEBUG("_nativenet_register_cb: event > NNEV_MAXEV");
|
||||||
|
@ -48,6 +48,8 @@ void rtc_disable(void)
|
|||||||
void rtc_set_localtime(struct tm *localt)
|
void rtc_set_localtime(struct tm *localt)
|
||||||
{
|
{
|
||||||
DEBUG("rtc_set_localtime()\n");
|
DEBUG("rtc_set_localtime()\n");
|
||||||
|
|
||||||
|
(void)localt; /* not implemented atm */
|
||||||
printf("setting time not supported.");
|
printf("setting time not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,9 @@ __attribute__((constructor)) static void startup(int argc, char **argv)
|
|||||||
printf("usage: %s <tap interface>\n", argv[0]);
|
printf("usage: %s <tap interface>\n", argv[0]);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
#else /* args unused here */
|
||||||
|
(void) argc;
|
||||||
|
(void) argv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
native_cpu_init();
|
native_cpu_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user