mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

us_ticker_api.h

Committer:
emilmont
Date:
2012-11-09
Revision:
8:c14af7958ef5
Parent:
0:8024c367e29f
Child:
9:663789d7729f

File content as of revision 8:c14af7958ef5:

/* mbed Microcontroller Library - us_ticker_api
 * Copyright (c) 2009 ARM Limited. All rights reserved.
 */
#ifndef MBED_US_TICKER_API_H
#define MBED_US_TICKER_API_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

uint32_t us_ticker_read(void);

typedef void (*ticker_event_handler)(uint32_t id);
void us_ticker_set_handler(ticker_event_handler handler);

typedef struct ticker_event_s {
    uint32_t timestamp;
    uint32_t id;
    struct ticker_event_s *next;
} ticker_event;

void us_ticker_insert_event(ticker_event *obj, unsigned int timestamp, uint32_t id);
void us_ticker_remove_event(ticker_event *obj);

#ifdef __cplusplus
}
#endif

#endif