RTEMS 6.1-rc6
Loading...
Searching...
No Matches
bestcomm_glue.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * RTEMS generic MPC5200 BSP
5 *
6 * This file declares glue functions to the Freescale BestComm API.
7 */
8
9/*
10 * Copyright (C) 2004, 2005 embedded brains GmbH & Co. KG
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#ifndef _BESTCOMM_GLUE_H
35#define _BESTCOMM_GLUE_H
36
37#include <rtems/irq-extension.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif /* __cplusplus */
42
43/*=========================================================================*\
44| Function: |
45\*-------------------------------------------------------------------------*/
46void bestcomm_glue_irq_enable
47(
48/*-------------------------------------------------------------------------*\
49| Purpose: |
50| enable interrupt for given task number |
51+---------------------------------------------------------------------------+
52| Input Parameters: |
53\*-------------------------------------------------------------------------*/
54 int bestcomm_taskno /* task number to enable */
55 );
56/*-------------------------------------------------------------------------*\
57| Return Value: |
58| none |
59\*=========================================================================*/
60
61/*=========================================================================*\
62| Function: |
63\*-------------------------------------------------------------------------*/
64void bestcomm_glue_irq_disable
65(
66/*-------------------------------------------------------------------------*\
67| Purpose: |
68| disable interrupt for given task number |
69+---------------------------------------------------------------------------+
70| Input Parameters: |
71\*-------------------------------------------------------------------------*/
72 int bestcomm_taskno /* task number to disable */
73 );
74/*-------------------------------------------------------------------------*\
75| Return Value: |
76| none |
77\*=========================================================================*/
78
79/*=========================================================================*\
80| Function: |
81\*-------------------------------------------------------------------------*/
82void bestcomm_glue_irq_install
83(
84/*-------------------------------------------------------------------------*\
85| Purpose: |
86| install given function as bestcomm interrupt handler |
87+---------------------------------------------------------------------------+
88| Input Parameters: |
89\*-------------------------------------------------------------------------*/
90 int bestcomm_taskno, /* task number for handler */
91 rtems_interrupt_handler handler, /* function to call */
92 void *arg
93 );
94/*-------------------------------------------------------------------------*\
95| Return Value: |
96| none |
97\*=========================================================================*/
98
99/*=========================================================================*\
100| Function: |
101\*-------------------------------------------------------------------------*/
102void bestcomm_glue_init
103(
104/*-------------------------------------------------------------------------*\
105| Purpose: |
106| initialize the bestcomm module (if not yet done): |
107| - load code |
108| - initialize registers |
109| - initialize bus arbiter |
110| - initialize interrupt control |
111+---------------------------------------------------------------------------+
112| Input Parameters: |
113\*-------------------------------------------------------------------------*/
114 void /* none */
115 );
116/*-------------------------------------------------------------------------*\
117| Return Value: |
118| none |
119\*=========================================================================*/
120
121void *bestcomm_malloc(size_t size);
122
123void bestcomm_free(void *ptr);
124
125#ifdef __cplusplus
126}
127#endif /* __cplusplus */
128
129#endif /* _BESTCOMM_GLUE_H */
void(* rtems_interrupt_handler)(void *)
Interrupt handler routines shall have this type.
Definition: intr.h:1030
This header file is provided for backward compatiblility.