timer_api.h File Reference

This file provides following mbed I2C API. More...

`#include "device.h"`

## Enumerations

Ameba Only
enum | { TIMER0 = 2, TIMER1 = 3, TIMER2 = 4, TIMER3 = 5, TIMER4 = 0, GTIMER_MAX = 5 }
AmebaZ Only
enum | { TIMER0 = 2, TIMER1 = 3, TIMER2 = 4, TIMER3 = 5, GTIMER_MAX = 5 }

## Ameba Common

typedef struct gtimer_s | gtimer_t
typedef void(* | gtimer_irq_handler) (uint32_t id)
void | gtimer_init (gtimer_t *obj, uint32_t tid)
| Initializes the timer, including clock/function/timer registers. More...
void | gtimer_deinit (gtimer_t *obj)
| Deinitializes the timer, including clock/function/timer registers. More...
uint32_t | gtimer_read_tick (gtimer_t *obj)
| Read current timer tick in Gtimer clock(0~32768). More...
uint64_t | gtimer_read_us (gtimer_t *obj)
| Read current timer tick in microsecond. More...
void | gtimer_reload (gtimer_t *obj, uint32_t duration_us)
| Reload timer. More...
void | gtimer_start (gtimer_t *obj)
| Start the timer. More...
void | gtimer_start_one_shout (gtimer_t *obj, uint32_t duration_us, void *handler, uint32_t hid)
| Set up a shout timer, including clock/function/timer registers. More...
void | gtimer_start_periodical (gtimer_t *obj, uint32_t duration_us, void *handler, uint32_t hid)
| Set up a periodic timer, including clock/function/timer registers. More...
void | gtimer_stop (gtimer_t *obj)
| Stop the timer, including clock/function/timer registers. More...

## Detailed Description

This file provides following mbed I2C API.

mbed Microcontroller Library

Author

Version
  V1.0.0

Attention

Copyright (c) 2006-2013 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.