Dear RIOT Team,

the function "timer_init" does not work. The function returns 0. So my
function call is correct.
But the ISR function is never called. Why ?
I have read the doc but found nothing to solve the problem.
Did i forget something ?

My Code:
===========================================================

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <inttypes.h>
#include "board.h"
#include "periph/gpio.h"
#include "periph_conf.h"
#include "led.h"
#include "shell.h"
#include "thread.h"
#include "periph/i2c.h"
#include "xtimer.h"
#include "periph/timer.h"



char stack[THREAD_STACKSIZE_MAIN];

static const shell_command_t commands[] = {
        { NULL, NULL, NULL }
};

void ISR_timer(void* arg, int argc){

        printf("ISR running\n");
        (void)arg;
        (void)argc;
}

int main(void)
{
    xtimer_sleep(1);

    printf("starte Timer\n");
    int returnval = timer_init(0,1,&ISR_timer,NULL);    //1 Hz
    printf("return = %d\n",returnval);



    char line_buf[SHELL_DEFAULT_BUFSIZE];
    shell_run(commands, line_buf, SHELL_DEFAULT_BUFSIZE);

    return 0;
}
===================================================================


-- 
Best Regards

Oliver Koepp
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to