]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/src/hal/_tms570_hdk/port_def.c
Separate target independent code
[pes-rpp/rpp-lib.git] / rpp / src / hal / _tms570_hdk / port_def.c
index 2da9a431839413b6f6dbaed996c4182820845013..f43826b3bd5d123d19ac462c8699e8a0709b1ccf 100644 (file)
@@ -65,46 +65,9 @@ static port_desc_t port_desc_adc = {
 };
 
 // Maps of port names to port descriptors
-static port_def_t port_definition[PORT_CNT] = {
+port_def_t port_definition[PORT_CNT] = {
        {.name = PORT_NAME_GIOA,      .desc = &port_desc_gioa},
        {.name = PORT_NAME_GIOB,      .desc = &port_desc_giob},
        {.name = PORT_NAME_NHET1,    .desc = &port_desc_nhet1},
        {.name = PORT_NAME_ADC,      .desc = &port_desc_adc}
 };
-
-/**
- *  Get port descriptor assigned to port name.
- *  @param[in]  port_name   Pointer to string - the name of the port.
- *  @param[in]  len         Length of the name, if terminated by '/0', then len=-1
- *  @return Port descriptor or NULL if not found
- */
-port_desc_t *hal_port_get_dsc(const char *port_name, int len)
-{
-       uint32_t i;
-       const char *port_name_ptr;
-       char port_name_term[32];
-
-       if (len != -1) {    // port name not terminated by '\0'
-               strncpy(port_name_term, port_name, len);
-               port_name_term[len] = '\0';
-               port_name_ptr = port_name_term;
-       }
-       else port_name_ptr = port_name;
-
-       for (i = 0; i < PORT_CNT; i++) {
-               if (strcmp(port_name_ptr, port_definition[i].name) == 0)
-                       return port_definition[i].desc;
-       }
-       return NULL;
-}
-
-/**
- *  Get port descriptor assigned to port name.
- *  @param[in]  port_name   Pointer to string - the name of the port.
- *  @param[in]  len         Length of the name, if terminated by '/0', then len=-1
- *  @return Port descriptor or NULL if not found
- */
-const port_def_t *hal_port_get_definitions()
-{
-       return (const port_def_t *)port_definition;
-}