mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Resync new repository with old repo r5166
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5154 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
* up_assert.c
|
* up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -153,13 +153,14 @@ config ARCH_HAVE_INTERRUPTSTACK
|
|||||||
bool
|
bool
|
||||||
|
|
||||||
config ARCH_INTERRUPTSTACK
|
config ARCH_INTERRUPTSTACK
|
||||||
bool "Use interrupt stack"
|
int "Interrupt Stack Size"
|
||||||
depends on ARCH_HAVE_INTERRUPTSTACK
|
depends on ARCH_HAVE_INTERRUPTSTACK
|
||||||
default y
|
default 0
|
||||||
---help---
|
---help---
|
||||||
This architecture supports an interrupt stack. If defined, this symbol
|
This architecture supports an interrupt stack. If defined, this symbol
|
||||||
is the size of the interrupt stack in bytes. If not defined, the user
|
will be the size of the interrupt stack in bytes. If not defined (or
|
||||||
task stacks will be used during interrupt handling.
|
defined to be zero), the user task stacks will be used during interrupt
|
||||||
|
handling.
|
||||||
|
|
||||||
comment "Boot options"
|
comment "Boot options"
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ config ARCH_CHIP_STM32
|
|||||||
bool "STMicro STM32"
|
bool "STMicro STM32"
|
||||||
select ARCH_HAVE_CMNVECTOR
|
select ARCH_HAVE_CMNVECTOR
|
||||||
select ARCH_HAVE_MPU
|
select ARCH_HAVE_MPU
|
||||||
|
select ARCH_HAVE_I2CRESET
|
||||||
---help---
|
---help---
|
||||||
STMicro STM32 architectures (ARM Cortex-M3/4).
|
STMicro STM32 architectures (ARM Cortex-M3/4).
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/include/armv7-m/irq.h
|
* arch/arm/include/armv7-m/irq.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
|
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -131,6 +132,7 @@ struct xcptcontext
|
|||||||
|
|
||||||
/* Disable IRQs */
|
/* Disable IRQs */
|
||||||
|
|
||||||
|
static inline void irqdisable(void) inline_function;
|
||||||
static inline void irqdisable(void)
|
static inline void irqdisable(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("\tcpsid i\n");
|
__asm__ __volatile__ ("\tcpsid i\n");
|
||||||
@@ -138,6 +140,7 @@ static inline void irqdisable(void)
|
|||||||
|
|
||||||
/* Save the current primask state & disable IRQs */
|
/* Save the current primask state & disable IRQs */
|
||||||
|
|
||||||
|
static inline irqstate_t irqsave(void) inline_function;
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t irqsave(void)
|
||||||
{
|
{
|
||||||
unsigned short primask;
|
unsigned short primask;
|
||||||
@@ -153,11 +156,13 @@ static inline irqstate_t irqsave(void)
|
|||||||
: "=r" (primask)
|
: "=r" (primask)
|
||||||
:
|
:
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return primask;
|
return primask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable IRQs */
|
/* Enable IRQs */
|
||||||
|
|
||||||
|
static inline void irqenable(void) inline_function;
|
||||||
static inline void irqenable(void)
|
static inline void irqenable(void)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("\tcpsie i\n");
|
__asm__ __volatile__ ("\tcpsie i\n");
|
||||||
@@ -165,6 +170,7 @@ static inline void irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved primask state */
|
/* Restore saved primask state */
|
||||||
|
|
||||||
|
static inline void irqrestore(irqstate_t primask) inline_function;
|
||||||
static inline void irqrestore(irqstate_t primask)
|
static inline void irqrestore(irqstate_t primask)
|
||||||
{
|
{
|
||||||
/* If bit 0 of the primask is 0, then we need to restore
|
/* If bit 0 of the primask is 0, then we need to restore
|
||||||
@@ -184,6 +190,7 @@ static inline void irqrestore(irqstate_t primask)
|
|||||||
|
|
||||||
/* Get/set the primask register */
|
/* Get/set the primask register */
|
||||||
|
|
||||||
|
static inline uint8_t getprimask(void) inline_function;
|
||||||
static inline uint8_t getprimask(void)
|
static inline uint8_t getprimask(void)
|
||||||
{
|
{
|
||||||
uint32_t primask;
|
uint32_t primask;
|
||||||
@@ -193,9 +200,11 @@ static inline uint8_t getprimask(void)
|
|||||||
: "=r" (primask)
|
: "=r" (primask)
|
||||||
:
|
:
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return (uint8_t)primask;
|
return (uint8_t)primask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void setprimask(uint32_t primask) inline_function;
|
||||||
static inline void setprimask(uint32_t primask)
|
static inline void setprimask(uint32_t primask)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
@@ -208,18 +217,22 @@ static inline void setprimask(uint32_t primask)
|
|||||||
|
|
||||||
/* Get/set the basepri register */
|
/* Get/set the basepri register */
|
||||||
|
|
||||||
|
static inline uint8_t getbasepri(void) inline_function;
|
||||||
static inline uint8_t getbasepri(void)
|
static inline uint8_t getbasepri(void)
|
||||||
{
|
{
|
||||||
uint32_t basepri;
|
uint32_t basepri;
|
||||||
|
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
"\tmrs %0, basepri\n"
|
"\tmrs %0, basepri\n"
|
||||||
: "=r" (basepri)
|
: "=r" (basepri)
|
||||||
:
|
:
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return (uint8_t)basepri;
|
return (uint8_t)basepri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void setbasepri(uint32_t basepri) inline_function;
|
||||||
static inline void setbasepri(uint32_t basepri)
|
static inline void setbasepri(uint32_t basepri)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
@@ -232,6 +245,7 @@ static inline void setbasepri(uint32_t basepri)
|
|||||||
|
|
||||||
/* Get/set IPSR */
|
/* Get/set IPSR */
|
||||||
|
|
||||||
|
static inline uint32_t getipsr(void) inline_function;
|
||||||
static inline uint32_t getipsr(void)
|
static inline uint32_t getipsr(void)
|
||||||
{
|
{
|
||||||
uint32_t ipsr;
|
uint32_t ipsr;
|
||||||
@@ -241,9 +255,11 @@ static inline uint32_t getipsr(void)
|
|||||||
: "=r" (ipsr)
|
: "=r" (ipsr)
|
||||||
:
|
:
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return ipsr;
|
return ipsr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void setipsr(uint32_t ipsr) inline_function;
|
||||||
static inline void setipsr(uint32_t ipsr)
|
static inline void setipsr(uint32_t ipsr)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
@@ -256,6 +272,7 @@ static inline void setipsr(uint32_t ipsr)
|
|||||||
|
|
||||||
/* Get/set CONTROL */
|
/* Get/set CONTROL */
|
||||||
|
|
||||||
|
static inline uint32_t getcontrol(void) inline_function;
|
||||||
static inline uint32_t getcontrol(void)
|
static inline uint32_t getcontrol(void)
|
||||||
{
|
{
|
||||||
uint32_t control;
|
uint32_t control;
|
||||||
@@ -265,9 +282,11 @@ static inline uint32_t getcontrol(void)
|
|||||||
: "=r" (control)
|
: "=r" (control)
|
||||||
:
|
:
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return control;
|
return control;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void setcontrol(uint32_t control) inline_function;
|
||||||
static inline void setcontrol(uint32_t control)
|
static inline void setcontrol(uint32_t control)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_assert.c
|
* arch/arm/src/arm/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -252,7 +252,7 @@ static void up_dumpstate(void)
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
/* SYS call 1:
|
/* SYS call 1:
|
||||||
*
|
*
|
||||||
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYS_restore_context (1)
|
#define SYS_restore_context (1)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-m/up_assert.c
|
* arch/arm/src/armv7-m/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -262,7 +262,7 @@ static void up_dumpstate(void)
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
* Description:
|
* Description:
|
||||||
* Restore the current thread context. Full prototype is:
|
* Restore the current thread context. Full prototype is:
|
||||||
*
|
*
|
||||||
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
*
|
*
|
||||||
* Return:
|
* Return:
|
||||||
* None
|
* None
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
|
|
||||||
/* R0=SYS_restore_context: This a restore context command:
|
/* R0=SYS_restore_context: This a restore context command:
|
||||||
*
|
*
|
||||||
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
*
|
*
|
||||||
* At this point, the following values are saved in context:
|
* At this point, the following values are saved in context:
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -223,7 +226,7 @@ extern void up_boot(void);
|
|||||||
extern void up_copystate(uint32_t *dest, uint32_t *src);
|
extern void up_copystate(uint32_t *dest, uint32_t *src);
|
||||||
extern void up_decodeirq(uint32_t *regs);
|
extern void up_decodeirq(uint32_t *regs);
|
||||||
extern int up_saveusercontext(uint32_t *saveregs);
|
extern int up_saveusercontext(uint32_t *saveregs);
|
||||||
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
|
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
|
||||||
|
|
||||||
/* Signal handling **********************************************************/
|
/* Signal handling **********************************************************/
|
||||||
|
|||||||
@@ -191,14 +191,17 @@ menu "STM32 Peripheral Support"
|
|||||||
config STM32_ADC1
|
config STM32_ADC1
|
||||||
bool "ADC1"
|
bool "ADC1"
|
||||||
default n
|
default n
|
||||||
|
select STM32_ADC
|
||||||
|
|
||||||
config STM32_ADC2
|
config STM32_ADC2
|
||||||
bool "ADC2"
|
bool "ADC2"
|
||||||
default n
|
default n
|
||||||
|
select STM32_ADC
|
||||||
|
|
||||||
config STM32_ADC3
|
config STM32_ADC3
|
||||||
bool "ADC3"
|
bool "ADC3"
|
||||||
default n
|
default n
|
||||||
|
select STM32_ADC
|
||||||
|
|
||||||
config STM32_CRC
|
config STM32_CRC
|
||||||
bool "CRC"
|
bool "CRC"
|
||||||
@@ -228,12 +231,14 @@ config STM32_CAN1
|
|||||||
bool "CAN1"
|
bool "CAN1"
|
||||||
default n
|
default n
|
||||||
select CAN
|
select CAN
|
||||||
|
select STM32_CAN
|
||||||
|
|
||||||
config STM32_CAN2
|
config STM32_CAN2
|
||||||
bool "CAN2"
|
bool "CAN2"
|
||||||
default n
|
default n
|
||||||
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
||||||
select CAN
|
select CAN
|
||||||
|
select STM32_CAN
|
||||||
|
|
||||||
config STM32_CCMDATARAM
|
config STM32_CCMDATARAM
|
||||||
bool "CMD/DATA RAM"
|
bool "CMD/DATA RAM"
|
||||||
@@ -248,10 +253,12 @@ config STM32_CRYP
|
|||||||
config STM32_DAC1
|
config STM32_DAC1
|
||||||
bool "DAC1"
|
bool "DAC1"
|
||||||
default n
|
default n
|
||||||
|
select STM32_DAC
|
||||||
|
|
||||||
config STM32_DAC2
|
config STM32_DAC2
|
||||||
bool "DAC2"
|
bool "DAC2"
|
||||||
default n
|
default n
|
||||||
|
select STM32_DAC
|
||||||
|
|
||||||
config STM32_DCMI
|
config STM32_DCMI
|
||||||
bool "DCMI"
|
bool "DCMI"
|
||||||
@@ -276,15 +283,18 @@ config STM32_HASH
|
|||||||
config STM32_I2C1
|
config STM32_I2C1
|
||||||
bool "I2C1"
|
bool "I2C1"
|
||||||
default n
|
default n
|
||||||
|
select STM32_I2C
|
||||||
|
|
||||||
config STM32_I2C2
|
config STM32_I2C2
|
||||||
bool "I2C2"
|
bool "I2C2"
|
||||||
default n
|
default n
|
||||||
|
select STM32_I2C
|
||||||
|
|
||||||
config STM32_I2C3
|
config STM32_I2C3
|
||||||
bool "I2C3"
|
bool "I2C3"
|
||||||
default n
|
default n
|
||||||
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
||||||
|
select STM32_I2C
|
||||||
|
|
||||||
config STM32_IWDG
|
config STM32_IWDG
|
||||||
bool "IWDG"
|
bool "IWDG"
|
||||||
@@ -319,23 +329,27 @@ config STM32_SPI1
|
|||||||
bool "SPI1"
|
bool "SPI1"
|
||||||
default n
|
default n
|
||||||
select SPI
|
select SPI
|
||||||
|
select STM32_SPI
|
||||||
|
|
||||||
config STM32_SPI2
|
config STM32_SPI2
|
||||||
bool "SPI2"
|
bool "SPI2"
|
||||||
default n
|
default n
|
||||||
select SPI
|
select SPI
|
||||||
|
select STM32_SPI
|
||||||
|
|
||||||
config STM32_SPI3
|
config STM32_SPI3
|
||||||
bool "SPI3"
|
bool "SPI3"
|
||||||
default n
|
default n
|
||||||
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
depends on STM32_STM32F20XX || STM32_STM32F40XX
|
||||||
select SPI
|
select SPI
|
||||||
|
select STM32_SPI
|
||||||
|
|
||||||
config STM32_SPI4
|
config STM32_SPI4
|
||||||
bool "SPI4"
|
bool "SPI4"
|
||||||
default n
|
default n
|
||||||
depends on STM32_STM32F10XX
|
depends on STM32_STM32F10XX
|
||||||
select SPI
|
select SPI
|
||||||
|
select STM32_SPI
|
||||||
|
|
||||||
config STM32_SYSCFG
|
config STM32_SYSCFG
|
||||||
bool "SYSCFG"
|
bool "SYSCFG"
|
||||||
@@ -450,19 +464,18 @@ endmenu
|
|||||||
|
|
||||||
config STM32_ADC
|
config STM32_ADC
|
||||||
bool
|
bool
|
||||||
default y if STM32_ADC1 || STM32_ADC2 || STM32_ADC3
|
|
||||||
|
|
||||||
config STM32_DAC
|
config STM32_DAC
|
||||||
bool
|
bool
|
||||||
default y if STM32_DAC1 || STM32_ADC2
|
|
||||||
|
|
||||||
config STM32_SPI
|
config STM32_SPI
|
||||||
bool
|
bool
|
||||||
default y if STM32_SPI1 || STM32_SPI2 || STM32_SPI3 || STM32_SPI4
|
|
||||||
|
config STM32_I2C
|
||||||
|
bool
|
||||||
|
|
||||||
config STM32_CAN
|
config STM32_CAN
|
||||||
bool
|
bool
|
||||||
default y if STM32_CAN1 || STM32_CAN2
|
|
||||||
|
|
||||||
menu "Alternate Pin Mapping"
|
menu "Alternate Pin Mapping"
|
||||||
|
|
||||||
@@ -571,10 +584,10 @@ choice
|
|||||||
config STM32_CAN1_NO_REMAP
|
config STM32_CAN1_NO_REMAP
|
||||||
bool "No pin remapping"
|
bool "No pin remapping"
|
||||||
|
|
||||||
config CONFIG_STM32_CAN1_REMAP1
|
config STM32_CAN1_REMAP1
|
||||||
bool "CAN1 alternate pin remapping #1"
|
bool "CAN1 alternate pin remapping #1"
|
||||||
|
|
||||||
config CONFIG_STM32_CAN1_REMAP2
|
config STM32_CAN1_REMAP2
|
||||||
bool "CAN1 alternate pin remapping #2"
|
bool "CAN1 alternate pin remapping #2"
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
@@ -1600,6 +1613,46 @@ config STM32_SPI_DMA
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
menu "I2C Configuration"
|
||||||
|
depends on STM32_I2C
|
||||||
|
|
||||||
|
config STM32_I2C_DYNTIMEO
|
||||||
|
bool "Use dynamic timeouts"
|
||||||
|
default n
|
||||||
|
depends on STM32_I2C
|
||||||
|
|
||||||
|
config STM32_I2C_DYNTIMEO_USECPERBYTE
|
||||||
|
int "Timeout Microseconds per Byte"
|
||||||
|
default 0
|
||||||
|
depends on STM32_I2C_DYNTIMEO
|
||||||
|
|
||||||
|
config STM32_I2C_DYNTIMEO_STARTSTOP
|
||||||
|
int "Timeout for Start/Stop (Milliseconds)"
|
||||||
|
default 5000
|
||||||
|
depends on STM32_I2C_DYNTIMEO
|
||||||
|
|
||||||
|
config STM32_I2CTIMEOSEC
|
||||||
|
int "Timeout seconds"
|
||||||
|
default 0
|
||||||
|
depends on STM32_I2C
|
||||||
|
|
||||||
|
config STM32_I2CTIMEOMS
|
||||||
|
int "Timeout Milliseconds"
|
||||||
|
default 500
|
||||||
|
depends on STM32_I2C && !STM32_I2C_DYNTIMEO
|
||||||
|
|
||||||
|
config STM32_I2CTIMEOTICKS
|
||||||
|
int "Timeout for Done and Stop (ticks)"
|
||||||
|
default 500
|
||||||
|
depends on STM32_I2C && !STM32_I2C_DYNTIMEO
|
||||||
|
|
||||||
|
config STM32_I2C_DUTY16_9
|
||||||
|
bool "Frequency with Tlow/Thigh = 16/9 "
|
||||||
|
default n
|
||||||
|
depends on STM32_I2C
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
menu "SDIO Configuration"
|
menu "SDIO Configuration"
|
||||||
depends on STM32_SDIO
|
depends on STM32_SDIO
|
||||||
|
|
||||||
@@ -1826,13 +1879,13 @@ config STM32_USBHOST_REGDEBUG
|
|||||||
default n
|
default n
|
||||||
depends on USBHOST && STM32_OTGFS
|
depends on USBHOST && STM32_OTGFS
|
||||||
---help---
|
---help---
|
||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG.
|
Enable very low-level register access debug. Depends on DEBUG.
|
||||||
|
|
||||||
config STM32_USBHOST_PKTDUMP
|
config STM32_USBHOST_PKTDUMP
|
||||||
bool "Packet Dump Debug"
|
bool "Packet Dump Debug"
|
||||||
default n
|
default n
|
||||||
depends on USBHOST && STM32_OTGFS
|
depends on USBHOST && STM32_OTGFS
|
||||||
---help---
|
---help---
|
||||||
Dump all incoming and outgoing USB packets. Depends on CONFIG_DEBUG.
|
Dump all incoming and outgoing USB packets. Depends on DEBUG.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|||||||
+193
-142
File diff suppressed because it is too large
Load Diff
@@ -1431,7 +1431,12 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||||||
spi_portinitialize(priv);
|
spi_portinitialize(priv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
spidbg("ERROR: Unsupported SPI port: %d\n", port);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
return (FAR struct spi_dev_s *)priv;
|
return (FAR struct spi_dev_s *)priv;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr/avr_internal.h
|
* arch/avr/src/avr/avr_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -40,7 +40,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
@@ -111,7 +114,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src);
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function;
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: up_switchcontext
|
* Name: up_switchcontext
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr32/up_internal.h
|
* arch/avr/src/avr32/up_internal.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -40,7 +40,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -109,7 +112,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src);
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: up_switchcontext
|
* Name: up_switchcontext
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ extern void up_copystate(uint8_t *dest, uint8_t *src);
|
|||||||
extern void up_decodeirq(uint8_t *regs);
|
extern void up_decodeirq(uint8_t *regs);
|
||||||
extern void up_irqinitialize(void);
|
extern void up_irqinitialize(void);
|
||||||
extern int up_saveusercontext(uint8_t *saveregs);
|
extern int up_saveusercontext(uint8_t *saveregs);
|
||||||
extern void up_fullcontextrestore(uint8_t *restoreregs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function;
|
||||||
extern void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs);
|
extern void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs);
|
||||||
|
|
||||||
/* Interrupt handling */
|
/* Interrupt handling */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/m9s12/m9s12_assert.c
|
* arch/hc/src/m9s12/m9s12_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -247,7 +247,7 @@ static void up_dumpstate(void)
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/include/mips32/syscall.h
|
* arch/mips/include/mips32/syscall.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
/* SYS call 1:
|
/* SYS call 1:
|
||||||
*
|
*
|
||||||
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYS_restore_context (1)
|
#define SYS_restore_context (1)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/mips32/up_assert.c
|
* arch/mips/src/mips32/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/mips32/up_swint0.c
|
* arch/mips/src/mips32/up_swint0.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -290,7 +290,7 @@ int up_swint0(int irq, FAR void *context)
|
|||||||
{
|
{
|
||||||
/* R4=SYS_restore_context: This a restore context command:
|
/* R4=SYS_restore_context: This a restore context command:
|
||||||
*
|
*
|
||||||
* void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
*
|
*
|
||||||
* At this point, the following values are saved in context:
|
* At this point, the following values are saved in context:
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_assert.c
|
* arch/sh/src/common/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -144,7 +147,7 @@ extern void up_copystate(uint32_t *dest, uint32_t *src);
|
|||||||
extern void up_dataabort(uint32_t *regs);
|
extern void up_dataabort(uint32_t *regs);
|
||||||
extern void up_decodeirq(uint32_t *regs);
|
extern void up_decodeirq(uint32_t *regs);
|
||||||
extern uint32_t *up_doirq(int irq, uint32_t *regs);
|
extern uint32_t *up_doirq(int irq, uint32_t *regs);
|
||||||
extern void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint32_t *regs) noreturn_function;
|
||||||
extern void up_irqinitialize(void);
|
extern void up_irqinitialize(void);
|
||||||
extern void up_prefetchabort(uint32_t *regs);
|
extern void up_prefetchabort(uint32_t *regs);
|
||||||
extern int up_saveusercontext(uint32_t *regs);
|
extern int up_saveusercontext(uint32_t *regs);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
#include <nuttx/compiler.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
|
|
||||||
@@ -150,7 +151,7 @@ extern volatile int g_eventloop;
|
|||||||
/* up_setjmp.S ************************************************************/
|
/* up_setjmp.S ************************************************************/
|
||||||
|
|
||||||
extern int up_setjmp(int *jb);
|
extern int up_setjmp(int *jb);
|
||||||
extern void up_longjmp(int *jb, int val) __attribute__ ((noreturn));
|
extern void up_longjmp(int *jb, int val) noreturn_function;
|
||||||
|
|
||||||
/* up_devconsole.c ********************************************************/
|
/* up_devconsole.c ********************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -323,7 +325,7 @@ struct gdt_entry_s
|
|||||||
uint8_t access; /* Access flags, determine ring segment can be used in */
|
uint8_t access; /* Access flags, determine ring segment can be used in */
|
||||||
uint8_t granularity;
|
uint8_t granularity;
|
||||||
uint8_t hibase; /* The last 8 bits of the base */
|
uint8_t hibase; /* The last 8 bits of the base */
|
||||||
} __attribute__((packed));
|
} packed_struct;
|
||||||
|
|
||||||
/* This structure refers to the array of GDT entries, and is in the format
|
/* This structure refers to the array of GDT entries, and is in the format
|
||||||
* required by the lgdt instruction.
|
* required by the lgdt instruction.
|
||||||
@@ -333,7 +335,7 @@ struct gdt_ptr_s
|
|||||||
{
|
{
|
||||||
uint16_t limit; /* The upper 16 bits of all selector limits */
|
uint16_t limit; /* The upper 16 bits of all selector limits */
|
||||||
uint32_t base; /* The address of the first GDT entry */
|
uint32_t base; /* The address of the first GDT entry */
|
||||||
} __attribute__((packed));
|
} packed_struct;
|
||||||
|
|
||||||
/* IDT data structures ******************************************************
|
/* IDT data structures ******************************************************
|
||||||
*
|
*
|
||||||
@@ -349,7 +351,7 @@ struct idt_entry_s
|
|||||||
uint8_t zero; /* This must always be zero */
|
uint8_t zero; /* This must always be zero */
|
||||||
uint8_t flags; /* (See documentation) */
|
uint8_t flags; /* (See documentation) */
|
||||||
uint16_t hibase; /* Upper 16-bits of vector address for interrupt */
|
uint16_t hibase; /* Upper 16-bits of vector address for interrupt */
|
||||||
} __attribute__((packed));
|
} packed_struct;
|
||||||
|
|
||||||
/* A struct describing a pointer to an array of interrupt handlers. This is
|
/* A struct describing a pointer to an array of interrupt handlers. This is
|
||||||
* in a format suitable for giving to 'lidt'.
|
* in a format suitable for giving to 'lidt'.
|
||||||
@@ -359,7 +361,7 @@ struct idt_ptr_s
|
|||||||
{
|
{
|
||||||
uint16_t limit;
|
uint16_t limit;
|
||||||
uint32_t base; /* The address of the first GDT entry */
|
uint32_t base; /* The address of the first GDT entry */
|
||||||
} __attribute__((packed));
|
} packed_struct;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Inline functions
|
* Inline functions
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/common/up_assert.c
|
* arch/x86/src/common/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -209,7 +209,7 @@ static void up_dumpstate(void)
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <nuttx/compiler.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -174,7 +177,7 @@ extern void up_irqinitialize(void);
|
|||||||
extern void weak_function up_dmainitialize(void);
|
extern void weak_function up_dmainitialize(void);
|
||||||
#endif
|
#endif
|
||||||
extern int up_saveusercontext(uint32_t *saveregs);
|
extern int up_saveusercontext(uint32_t *saveregs);
|
||||||
extern void up_fullcontextrestore(uint32_t *restoreregs) __attribute__ ((noreturn));
|
extern void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function;
|
||||||
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
|
extern void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs);
|
||||||
extern void up_sigdeliver(void);
|
extern void up_sigdeliver(void);
|
||||||
extern void up_lowputc(char ch);
|
extern void up_lowputc(char ch);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline));
|
static void idt_outb(uint8_t val, uint16_t addr) noinline_function;
|
||||||
static void up_remappic(void);
|
static void up_remappic(void);
|
||||||
static void up_idtentry(unsigned int index, uint32_t base, uint16_t sel,
|
static void up_idtentry(unsigned int index, uint32_t base, uint16_t sel,
|
||||||
uint8_t flags);
|
uint8_t flags);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/x86/src/qemu/qemu_fullcontextrestore.S
|
* arch/x86/src/qemu/qemu_fullcontextrestore.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
* Name: up_fullcontextrestore
|
* Name: up_fullcontextrestore
|
||||||
*
|
*
|
||||||
* Full C prototype:
|
* Full C prototype:
|
||||||
* void up_fullcontextrestore(uint32_t *regs) __attribute__ ((noreturn));
|
* void up_fullcontextrestore(uint32_t *regs) noreturn_function;
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/qemu/qemu_handlers.c
|
* arch/x86/src/qemu/qemu_handlers.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void idt_outb(uint8_t val, uint16_t addr) __attribute__((noinline));
|
static void idt_outb(uint8_t val, uint16_t addr) noinline_function;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_assert.c
|
* common/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_assert.c
|
* common/up_assert.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: 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
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
* Name: _up_assert
|
* Name: _up_assert
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
static void _up_assert(int errorcode) /* noreturn_function */
|
||||||
{
|
{
|
||||||
/* Are we in an interrupt handler or the idle task? */
|
/* Are we in an interrupt handler or the idle task? */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user