Skip to content
Snippets Groups Projects
Commit a8c7b0bb authored by patacongo's avatar patacongo
Browse files

Fix another LPC43xx pin configuration problem

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4926 42af7a65-404d-4744-a932-0658087f49c3
parent 23c742b8
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
* Copyright (C) 2011 Uros Platise. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise <uros.platise@isotel.eu> * Author: Uros Platise <uros.platise@isotel.eu>
* *
* With updates, modifications, and general maintenance by:
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Auther: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -66,16 +71,34 @@ ...@@ -66,16 +71,34 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: namedapp_getname
*
* Description:
* Return the name of the application at index in the table of named
* applications.
*
****************************************************************************/
const char *namedapp_getname(int index) const char *namedapp_getname(int index)
{ {
if (index < 0 || index >= number_namedapps()) if (index < 0 || index >= number_namedapps())
{ {
return NULL; return NULL;
} }
return namedapps[index].name; return namedapps[index].name;
} }
/****************************************************************************
* Name: namedapp_isavail
*
* Description:
* Return the index into the table of applications for the applicaiton with
* the name 'appname'.
*
****************************************************************************/
int namedapp_isavail(FAR const char *appname) int namedapp_isavail(FAR const char *appname)
{ {
int i; int i;
...@@ -92,6 +115,15 @@ int namedapp_isavail(FAR const char *appname) ...@@ -92,6 +115,15 @@ int namedapp_isavail(FAR const char *appname)
return ERROR; return ERROR;
} }
/****************************************************************************
* Name: namedapp_isavail
*
* Description:
* Execute the application with name 'appname', providing the arguments
* in the argv[] array.
*
****************************************************************************/
int exec_namedapp(FAR const char *appname, FAR const char **argv) int exec_namedapp(FAR const char *appname, FAR const char **argv)
{ {
int i; int i;
...@@ -100,21 +132,21 @@ int exec_namedapp(FAR const char *appname, FAR const char **argv) ...@@ -100,21 +132,21 @@ int exec_namedapp(FAR const char *appname, FAR const char **argv)
{ {
#ifndef CONFIG_CUSTOM_STACK #ifndef CONFIG_CUSTOM_STACK
i = task_create(namedapps[i].name, namedapps[i].priority, i = task_create(namedapps[i].name, namedapps[i].priority,
namedapps[i].stacksize, namedapps[i].main, namedapps[i].stacksize, namedapps[i].main,
(argv) ? &argv[1] : (const char **)NULL); (argv) ? &argv[1] : (const char **)NULL);
#else #else
i = task_create(namedapps[i].name, namedapps[i].priority, namedapps[i].main, i = task_create(namedapps[i].name, namedapps[i].priority, namedapps[i].main,
(argv) ? &argv[1] : (const char **)NULL); (argv) ? &argv[1] : (const char **)NULL);
#endif #endif
#if CONFIG_RR_INTERVAL > 0 #if CONFIG_RR_INTERVAL > 0
if (i > 0) if (i > 0)
{ {
struct sched_param param; struct sched_param param;
sched_getparam(0, &param); sched_getparam(0, &param);
sched_setscheduler(i, SCHED_RR, &param); sched_setscheduler(i, SCHED_RR, &param);
} }
#endif #endif
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* apps/namedaps/namedapp.h * apps/namedaps/namedapp.h
* *
* Copyright (C) 2011 Uros Platise. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Authors: Uros Platise <uros.platise@isotel.eu> * Authors: Uros Platise <uros.platise@isotel.eu>
* Gregory Nutt <spudmonkey@racsa.co.cr> * Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment