RTEMS: bsps/powerpc/include/mpc83xx/gtm.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
gtm.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2008
9 * Embedded Brains GmbH
10 * Obere Lagerstr. 30
11 * D-82178 Puchheim
12 * Germany
13 * rtems@embedded-brains.de
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.org/license/LICENSE.
18 */
19
20#ifndef LIBBSP_POWERPC_MPC83XX_TIMER_H
21#define LIBBSP_POWERPC_MPC83XX_TIMER_H
22
23#include <stdint.h>
24#include <stdbool.h>
25
26#include <rtems.h>
27
28#define MPC83XX_GTM_NUMBER 8
29
30#define MPC83XX_GTM_CLOCK_CASCADED 0x0000
31#define MPC83XX_GTM_CLOCK_SYSTEM 0x0002
32#define MPC83XX_GTM_CLOCK_SYSTEM_SLOW 0x0004
33#define MPC83XX_GTM_CLOCK_EXTERN 0x0006
34
35 rtems_status_code mpc83xx_gtm_initialize( int timer, int clock);
36
37 rtems_status_code mpc83xx_gtm_enable_restart( int timer, bool enable);
38
39 rtems_status_code mpc83xx_gtm_set_clock( int timer, int clock);
40
41 rtems_status_code mpc83xx_gtm_get_clock( int timer, int *clock);
42
43 rtems_status_code mpc83xx_gtm_start( int timer);
44
45 rtems_status_code mpc83xx_gtm_stop( int timer);
46
47 rtems_status_code mpc83xx_gtm_set_value( int timer, uint16_t value);
48
49 rtems_status_code mpc83xx_gtm_get_value( int timer, uint16_t *value);
50
51 rtems_status_code mpc83xx_gtm_set_reference( int timer, uint16_t reference);
52
53 rtems_status_code mpc83xx_gtm_get_reference( int timer, uint16_t *reference);
54
55 rtems_status_code mpc83xx_gtm_set_prescale( int timer, uint8_t prescale);
56
57 rtems_status_code mpc83xx_gtm_get_prescale( int timer, uint8_t *prescale);
58
59 rtems_status_code mpc83xx_gtm_interrupt_get_vector( int timer, rtems_vector_number *vector);
60
61 rtems_status_code mpc83xx_gtm_interrupt_enable( int timer);
62
63 rtems_status_code mpc83xx_gtm_interrupt_disable( int timer);
64
65 rtems_status_code mpc83xx_gtm_interrupt_clear( int timer);
66
67#endif /* LIBBSP_POWERPC_MPC83XX_TIMER_H */
rtems_vector_number
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:47
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems.h