1 /* Copyright (C) 2013-2014 Czech Technical University in Prague
3 * - Michal Horn <hornmich@fel.cvut.cz>
5 * This document contains proprietary information belonging to Czech
6 * Technical University in Prague. Passing on and copying of this
7 * document, and communication of its contents is not permitted
8 * without prior written authorization.
14 //#include "sys_common.h"
18 * Get values of all pins of given port.
19 * @param[in] config Pointer to array of pin descriptors
20 * @param[in] num_val Number of pins assigned to the port
21 * @param[out] values Stored values of all pins of the port. 1st bit -> pin0, 2nd bit -> pin1...
24 uint32_t hal_gio_port_get_val(uint32_t *config, uint32_t num_val, uint32_t *values);
27 * Set values to all pins of given port.
28 * @param[in] config Pointer to array of pin descriptors
29 * @param[in] num_val Number of pins assigned to the port
30 * @param[in] values Stored values of all pins of the port. 1st bit -> pin0, 2nd bit -> pin1...
33 uint32_t hal_gio_port_set_val(uint32_t *config, uint32_t num_val, const uint32_t *values);
36 * Get port descriptor assigned to port name.
37 * @param[in] port_name Pointer to string - the name of the port.
38 * @param[in] len Length of the name, if terminated by '/0', then len=-1
39 * @return Port descriptor or NULL if not found
41 const port_def_t *hal_port_get_definitions();
43 port_desc_t *hal_port_get_dsc(const char *port_name, int len);
46 * Get port descriptor assigned to port name.
47 * @param[in] port_name Pointer to string - the name of the port.
48 * @param[in] len Length of the name, if terminated by '/0', then len=-1
49 * @return Port descriptor or NULL if not found
51 port_desc_t *hal_port_get_dsc(const char *port_name, int len);
53 #endif /* PORT_GPIO_H_ */