Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/mbed/hal/port_api.h
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/mbed/hal/port_api.h
r321 r429 1 2 /** \addtogroup hal */ 3 /** @{*/ 1 4 /* mbed Microcontroller Library 2 5 * Copyright (c) 2006-2013 ARM Limited … … 25 28 #endif 26 29 30 /** Port HAL structure. port_s is declared in the target's HAL 31 */ 27 32 typedef struct port_s port_t; 28 33 34 /** 35 * \defgroup hal_port Port HAL functions 36 * @{ 37 */ 38 39 /** Get the pin name from the port's pin number 40 * 41 * @param port The port name 42 * @param pin_n The pin number within the specified port 43 * @return The pin name for the port's pin number 44 */ 29 45 PinName port_pin(PortName port, int pin_n); 30 46 31 void port_init (port_t *obj, PortName port, int mask, PinDirection dir); 32 void port_mode (port_t *obj, PinMode mode); 33 void port_dir (port_t *obj, PinDirection dir); 47 /** Initilize the port 48 * 49 * @param obj The port object to initialize 50 * @param port The port name 51 * @param mask The bitmask to identify which bits in the port should be included (0 - ignore) 52 * @param dir The port direction 53 */ 54 void port_init(port_t *obj, PortName port, int mask, PinDirection dir); 55 56 /** Set the input port mode 57 * 58 * @param obj The port object 59 * @param mode THe port mode to be set 60 */ 61 void port_mode(port_t *obj, PinMode mode); 62 63 /** Set port direction (in/out) 64 * 65 * @param obj The port object 66 * @param dir The port direction to be set 67 */ 68 void port_dir(port_t *obj, PinDirection dir); 69 70 /** Write value to the port 71 * 72 * @param obj The port object 73 * @param value The value to be set 74 */ 34 75 void port_write(port_t *obj, int value); 35 int port_read (port_t *obj); 76 77 /** Read the current value on the port 78 * 79 * @param obj The port object 80 * @return An integer with each bit corresponding to an associated port pin setting 81 */ 82 int port_read(port_t *obj); 83 84 /**@}*/ 36 85 37 86 #ifdef __cplusplus … … 41 90 42 91 #endif 92 93 /** @}*/
Note:
See TracChangeset
for help on using the changeset viewer.