Nut/OS  4.10.3
API Reference
arm.h File Reference
#include <cfg/arch.h>
#include <dev/mweeprom.h>
Include dependency graph for arm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ARM_MODE_USER   0x10
#define ARM_MODE_FIQ   0x11
#define ARM_MODE_IRQ   0x12
#define ARM_MODE_SVC   0x13
#define ARM_MODE_ABORT   0x17
#define ARM_MODE_UNDEF   0x1B
#define ARM_MODE_SYS   0x1F
#define ARM_MODE_MASK   0x1F
#define I_BIT   0x80
#define ARM_CPSR_I_BIT   0x80
#define F_BIT   0x40
#define ARM_CPSR_F_BIT   0x40
#define T_BIT   0x20
#define ARM_CPSR_T_BIT   0x20
#define CONST   const
#define INLINE   inline
#define PSTR(p)   (p)
#define PRG_RDB(p)   (*((const char *)(p)))
#define prog_char   const char
#define PGM_P   prog_char *
#define SIGNAL(x)   __attribute__((interrupt_handler)) void x(void)
#define RAMFUNC   __attribute__ ((long_call, section (".ramfunc")))
#define main   NutAppMain
#define strlen_P(x)   strlen((char *)(x))
#define strcpy_P(x, y)   strcpy(x,(char *)(y))
#define strcat_P(x, y)   strcat(x,(char *)(y))
#define strcmp_P(x, y)   strcmp((char *)(x), (char *)(y))
#define memcpy_P(x, y, z)   memcpy(x, y, z)
#define _NOP()   __asm__ __volatile__ ("mov r0, r0 @ _NOP")
#define outb(_reg, _val)   (*((volatile unsigned char *)(_reg)) = (_val))
#define outw(_reg, _val)   (*((volatile unsigned short *)(_reg)) = (_val))
#define outr(_reg, _val)   (*((volatile unsigned int *)(_reg)) = (_val))
#define inb(_reg)   (*((volatile unsigned char *)(_reg)))
#define inw(_reg)   (*((volatile unsigned short *)(_reg)))
#define inr(_reg)   (*((volatile unsigned int *)(_reg)))
#define _BV(bit)   (1 << (bit))
#define sbi(_reg, _bit)   outr(_reg, inr(_reg) | _BV(_bit))
#define cbi(_reg, _bit)   outr(_reg, inr(_reg) & ~_BV(_bit))
#define bit_is_set(_reg, _bit)   ((inr(_reg) & _BV(_bit)) != 0)
#define _SFR_MEM8(addr)   (addr)
#define _SFR_MEM16(addr)   (addr)
#define ARM_SET_CP15_CR(val)   __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 0" :: "r"(val) : "cc")
#define ARM_GET_CP15_CR()

Variables

void * __bss_end
 End of uninitialised data segment. Defined in the linker script.
void * __stack
 Begin of the stack segment. Defined in the linker script.

Define Documentation

#define ARM_MODE_USER   0x10

Definition at line 126 of file arm.h.

#define ARM_MODE_FIQ   0x11

Definition at line 127 of file arm.h.

#define ARM_MODE_IRQ   0x12

Definition at line 128 of file arm.h.

#define ARM_MODE_SVC   0x13

Definition at line 129 of file arm.h.

#define ARM_MODE_ABORT   0x17

Definition at line 130 of file arm.h.

#define ARM_MODE_UNDEF   0x1B

Definition at line 131 of file arm.h.

#define ARM_MODE_SYS   0x1F

Definition at line 132 of file arm.h.

Referenced by NutThreadCreate().

#define ARM_MODE_MASK   0x1F

Definition at line 133 of file arm.h.

#define I_BIT   0x80

Definition at line 135 of file arm.h.

#define ARM_CPSR_I_BIT   0x80

Definition at line 136 of file arm.h.

Referenced by NutThreadCreate(), and ptrace_dump_regs().

#define F_BIT   0x40

Definition at line 137 of file arm.h.

#define ARM_CPSR_F_BIT   0x40

Definition at line 138 of file arm.h.

Referenced by NutThreadCreate(), and ptrace_dump_regs().

#define T_BIT   0x20

Definition at line 139 of file arm.h.

#define ARM_CPSR_T_BIT   0x20

Definition at line 140 of file arm.h.

Referenced by ptrace_dump_regs().

#define INLINE   inline

Definition at line 144 of file arm.h.

#define PSTR (   p)    (p)
Examples:
httpd/httpserv.c.

Definition at line 154 of file arm.h.

Referenced by cs8900Init(), cs8900Output(), CSNicInit(), CSNicOutput(), CSNICrx(), and ShowForm().

#define PRG_RDB (   p)    (*((const char *)(p)))
#define PGM_P   prog_char *

Definition at line 158 of file arm.h.

Referenced by _putf(), NutBlockDeviceWrite_P(), and sscanf_P().

#define SIGNAL (   x)    __attribute__((interrupt_handler)) void x(void)

Definition at line 160 of file arm.h.

#define RAMFUNC   __attribute__ ((long_call, section (".ramfunc")))

Definition at line 161 of file arm.h.

#define strlen_P (   x)    strlen((char *)(x))

Definition at line 167 of file arm.h.

Referenced by _putf(), fputs_P(), NutChat_P(), vfprintf_P(), vfscanf_P(), vsprintf_P(), vsscanf_P(), and vsyslog_P().

#define strcpy_P (   x,
 
)    strcpy(x,(char *)(y))

Definition at line 168 of file arm.h.

Referenced by _putf(), and NutChat_P().

#define strcat_P (   x,
 
)    strcat(x,(char *)(y))

Definition at line 169 of file arm.h.

#define strcmp_P (   x,
 
)    strcmp((char *)(x), (char *)(y))

Definition at line 171 of file arm.h.

Referenced by NutFtpProcessRequest().

#define memcpy_P (   x,
  y,
 
)    memcpy(x, y, z)

Definition at line 172 of file arm.h.

Referenced by NutTcpDeviceWrite_P(), vfprintf_P(), vfscanf_P(), vsprintf_P(), and vsscanf_P().

#define _NOP ( )    __asm__ __volatile__ ("mov r0, r0 @ _NOP")

Definition at line 188 of file arm.h.

Referenced by Delay16Cycles(), NutMicroDelay(), and VsPlayerReset().

#define outw (   _reg,
  _val 
)    (*((volatile unsigned short *)(_reg)) = (_val))

Definition at line 195 of file arm.h.

#define inw (   _reg)    (*((volatile unsigned short *)(_reg)))

Definition at line 199 of file arm.h.

#define bit_is_set (   _reg,
  _bit 
)    ((inr(_reg) & _BV(_bit)) != 0)

Definition at line 206 of file arm.h.

Referenced by AtCanGetFreeMob(), GpioPinGet(), NutIdle(), SpiDigitalGet(), TwIOCtl(), and UartAvrIOCtl().

#define _SFR_MEM8 (   addr)    (addr)

Definition at line 212 of file arm.h.

#define _SFR_MEM16 (   addr)    (addr)

Definition at line 213 of file arm.h.

#define ARM_SET_CP15_CR (   val)    __asm__ __volatile__("mcr p15, 0, %0, c1, c0, 0" :: "r"(val) : "cc")

Definition at line 217 of file arm.h.

Referenced by __init3(), and __init4().

#define ARM_GET_CP15_CR ( )
Value:
( \
    { \
        unsigned int val; \
        __asm__ __volatile__("mrc p15, 0, %0, c1, c0, 0" : "=r"(val) :: "cc"); \
        val; \
    } \
)

Definition at line 218 of file arm.h.

Referenced by __init3(), and __init4().


Variable Documentation

void* __bss_end

End of uninitialised data segment. Defined in the linker script.

void* __stack

Begin of the stack segment. Defined in the linker script.