]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Cleanup port definition
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 3 Jul 2015 12:51:42 +0000 (14:51 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 3 Jul 2015 12:51:42 +0000 (14:51 +0200)
- Remove DMM port from hydctr
- Make sure that defined indexes match to the real indexes.

rpp/include/hal/_tms570_hydctr/gpio_def.h
rpp/src/hal/_rm48_hdk/gpio_def.c
rpp/src/hal/_tms570_hdk/gpio_def.c
rpp/src/hal/_tms570_hydctr/gpio_def.c

index be12240eacdbf108e63c0efe4427da978ac65bcd..663fc01f8a9603a6cdf89f01915b094072bf21a4 100644 (file)
@@ -72,7 +72,6 @@ typedef struct pin_map_element {
 #define MAX_PIN_CNT     46
 #define MAX_PORT_CNT    5
 /* Port indexes to portmap */
-#define PORT_ID_DMM     0x0
 #define PORT_ID_GIOA    0x1
 #define PORT_ID_GIOB    0x2
 #define PORT_ID_HET1    0x3
index 45ce9b0d79e97708053b13d6b60f29e966ddf989..e88bd3e0e9cd35444866d2291be8da5947daaaf7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2013 Czech Technical University in Prague
+/* Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
  *
  * Authors:
  *     - Michal Horn <hornmich@fel.cvut.cz>
  * Array of ports used as GPIO. Thanks to that array, we can
  * determine port just by index in pin_desc at 5th bit */
 gioPORT_t *port_id_map[MAX_PORT_CNT] = {
-       (gioPORT_t *)dmmPORT,
-       (gioPORT_t *)gioPORTA,
-       (gioPORT_t *)gioPORTB,
-       (gioPORT_t *)hetPORT1,
-       (gioPORT_t *)hetPORT2
+       [PORT_ID_DMM]  = (gioPORT_t *)dmmPORT,
+       [PORT_ID_GIOA] = (gioPORT_t *)gioPORTA,
+       [PORT_ID_GIOB] = (gioPORT_t *)gioPORTB,
+       [PORT_ID_HET1] = (gioPORT_t *)hetPORT1,
+       [PORT_ID_HET2] = (gioPORT_t *)hetPORT2
 };
 
 /* Some pins are commented out, because they are pinmuxed with SCI. */
index 45ce9b0d79e97708053b13d6b60f29e966ddf989..e88bd3e0e9cd35444866d2291be8da5947daaaf7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2013 Czech Technical University in Prague
+/* Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
  *
  * Authors:
  *     - Michal Horn <hornmich@fel.cvut.cz>
  * Array of ports used as GPIO. Thanks to that array, we can
  * determine port just by index in pin_desc at 5th bit */
 gioPORT_t *port_id_map[MAX_PORT_CNT] = {
-       (gioPORT_t *)dmmPORT,
-       (gioPORT_t *)gioPORTA,
-       (gioPORT_t *)gioPORTB,
-       (gioPORT_t *)hetPORT1,
-       (gioPORT_t *)hetPORT2
+       [PORT_ID_DMM]  = (gioPORT_t *)dmmPORT,
+       [PORT_ID_GIOA] = (gioPORT_t *)gioPORTA,
+       [PORT_ID_GIOB] = (gioPORT_t *)gioPORTB,
+       [PORT_ID_HET1] = (gioPORT_t *)hetPORT1,
+       [PORT_ID_HET2] = (gioPORT_t *)hetPORT2
 };
 
 /* Some pins are commented out, because they are pinmuxed with SCI. */
index 45ce9b0d79e97708053b13d6b60f29e966ddf989..98a8b2fcf3779f24abddb99881ef25e4304e2f46 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2013 Czech Technical University in Prague
+/* Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
  *
  * Authors:
  *     - Michal Horn <hornmich@fel.cvut.cz>
  * Array of ports used as GPIO. Thanks to that array, we can
  * determine port just by index in pin_desc at 5th bit */
 gioPORT_t *port_id_map[MAX_PORT_CNT] = {
-       (gioPORT_t *)dmmPORT,
-       (gioPORT_t *)gioPORTA,
-       (gioPORT_t *)gioPORTB,
-       (gioPORT_t *)hetPORT1,
-       (gioPORT_t *)hetPORT2
+       [PORT_ID_GIOA] = (gioPORT_t *)gioPORTA,
+       [PORT_ID_GIOB] = (gioPORT_t *)gioPORTB,
+       [PORT_ID_HET1] = (gioPORT_t *)hetPORT1,
+       [PORT_ID_HET2] = (gioPORT_t *)hetPORT2
 };
 
 /* Some pins are commented out, because they are pinmuxed with SCI. */