Various SAM4S related fixes, mostely related to the timer driver driver and the SAM4S timer/counter. All from Bob Doisin
This commit is contained in:
parent
f42c357654
commit
44173905cb
@ -41,6 +41,7 @@
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
|
@ -72,6 +72,9 @@ ifeq ($(CONFIG_SAM34_WDT),y)
|
||||
CSRCS += sam_wdt.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TIMER),y)
|
||||
CSRCS += sam_tc.c
|
||||
endif
|
||||
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#define HAVE_HSMCI 1
|
||||
#define HAVE_PROC 1
|
||||
#define HAVE_USBDEV 1
|
||||
#define HAVE_USBDEV 0
|
||||
#undef HAVE_USBMONITOR
|
||||
|
||||
/* HSMCI */
|
||||
|
@ -45,10 +45,9 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef CONFIG_SYSTEM_USBMONITOR
|
||||
# include <apps/usbmonitor.h>
|
||||
#endif
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#ifdef CONFIG_CDCACM
|
||||
# include <nuttx/usb/cdcacm.h>
|
||||
@ -58,6 +57,14 @@
|
||||
# include <nuttx/usb/pl2303.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TIMER
|
||||
# include <nuttx/timer.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSTEM_USBMONITOR
|
||||
# include <apps/usbmonitor.h>
|
||||
#endif
|
||||
|
||||
#include "sam4s-xplained-pro.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -134,7 +141,6 @@ int nsh_archinitialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#warning "add automount config...."
|
||||
message("Mounting /dev/mmcsd0 to /fat\n");
|
||||
ret = mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL);
|
||||
if (ret < 0)
|
||||
@ -143,5 +149,11 @@ int nsh_archinitialize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TIMER
|
||||
/* Registers the timer driver and starts an async interrupt. */
|
||||
|
||||
up_timerinitialize();
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -139,6 +139,7 @@ static int wdog_daemon(int argc, char *argv[])
|
||||
goto errout_with_dev;
|
||||
}
|
||||
|
||||
usleep(200);
|
||||
while(1)
|
||||
{
|
||||
usleep((CONFIG_WDT_THREAD_INTERVAL)*1000);
|
||||
|
Loading…
Reference in New Issue
Block a user