summaryrefslogtreecommitdiff
path: root/nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c')
-rw-r--r--nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c b/nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c
index 07f3345ea..b2b2d457e 100644
--- a/nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c
+++ b/nuttx/configs/dk-tm4c129x/src/tm4c_bringup.c
@@ -39,7 +39,9 @@
#include <nuttx/config.h>
-#include <syslog.h>
+#include <debug.h>
+
+#include <arch/board/board.h>
#include "dk-tm4c129x.h"
@@ -47,6 +49,11 @@
* Pre-Processor Definitions
****************************************************************************/
+#ifdef CONFIG_SYSTEM_LM75_DEVNAME
+# define TMP100_DEVNAME CONFIG_SYSTEM_LM75_DEVNAME
+#else
+# define TMP100_DEVNAME "/dev/temp"
+#endif
/****************************************************************************
* Public Functions
@@ -62,5 +69,17 @@
int tm4c_bringup(void)
{
+#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_TIVA_I2C6)
+ int ret;
+
+ /* Initialize and register the TMP-100 Temperature Sensor driver. */
+
+ ret = tiva_tmp100_initialize(TMP100_DEVNAME);
+ if (ret < 0)
+ {
+ dbg("ERROR: Failed to initialize TMP100 driver: %d\n", ret);
+ }
+#endif
+
return OK;
}