source: rtems/c/src/lib/libbsp/arm/lpc176x/include/io.h @ 6a941e3

4.115
Last change on this file since 6a941e3 was 19260fb, checked in by Martin Boretto <martin.boretto@…>, on 06/09/14 at 14:27:18

bsp/lpc176x: New BSP

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file io.h
3 *
4 * @ingroup lpc176x
5 *
6 * @brief Input/output module methods definitions.
7 */
8
9/*
10 * Copyright (c) 2014 Taller Technologies.
11 *
12 * @author  Boretto Martin    (martin.boretto@tallertechnologies.com)
13 * @author  Diaz Marcos (marcos.diaz@tallertechnologies.com)
14 * @author  Lenarduzzi Federico  (federico.lenarduzzi@tallertechnologies.com)
15 * @author  Daniel Chicco  (daniel.chicco@tallertechnologies.com)
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.com/license/LICENSE.
20 */
21
22#ifndef LIBBSP_ARM_LPC176X_IO_H
23#define LIBBSP_ARM_LPC176X_IO_H
24
25#include <assert.h>
26#include <rtems.h>
27#include <bsp/io-defs.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33/**
34 * @brief Set pin to the selected function.
35 *
36 * @param pin The pin to set.
37 * @param function Defines the function to set.
38 */
39void lpc176x_pin_select(
40  uint32_t             pin,
41  lpc176x_pin_function function
42);
43
44/**
45 * @brief Enables the module power and clock.
46 *
47 * @param  module Represents the module to be enabled.
48 * @param  clock  Represents the clock to set for this module.
49 * @return RTEMS_SUCCESFULL if the module was enabled succesfully.
50 */
51rtems_status_code lpc176x_module_enable(
52  lpc176x_module       module,
53  lpc176x_module_clock clock
54);
55
56/**
57 * @brief Checks if the current module is turned off and disables a module.
58 *
59 * @param  module Represents the module to be disabled.
60 * @return RTEMS_SUCCESFULL if the module was disabled succesfully.
61 */
62rtems_status_code lpc176x_module_disable( lpc176x_module module );
63
64/**
65 * @brief Checks if the current module is enabled or not.
66 *
67 * @param  module Represents the module to be checked.
68 * @return TRUE if the module is enabled.
69 *         FALSE otherwise.
70 */
71bool lpc176x_module_is_enabled( lpc176x_module module );
72
73#ifdef __cplusplus
74}
75#endif /* __cplusplus */
76
77#endif /* LIBBSP_ARM_LPC176X_IO_H */
Note: See TracBrowser for help on using the repository browser.