XT-26  Código del proyecto desarrollado en Sistemas Digitales II (SDII)
Antonio Julián Alférez Zamora & Sonsoles López Pernas
Referencia del Archivo m5272lib.h

Ir al código fuente de este archivo.

'defines'

#define INLINE
 
#define SIN_SIGNO   1
 
#define MAYUSC   2
 
#define RET_1S   1000000
 
#define RET_15MS   15000
 
#define RET_3MS   3000
 
#define ACCESO_A_MEMORIA_LONG(dir)   (*(ULONG *)(dir))
 
#define bsetb(bit, mem)   __asm__ __volatile__ ("bset.b %0,%1"::"n"(bit),"m"(mem))
 
#define bclrb(bit, mem)   __asm__ __volatile__ ("bclr.b %0,%1"::"n"(bit),"m"(mem))
 
#define bsetl(bit, mem)   __asm__ __volatile__ ("moveal %1,%%a0\n\t" "move.l (%%a0),%%d0\n\t" "bset.l %0,%%d0\n\t" "move.l %%d0,(%%a0)\n\t"::"n"(bit),"m"(mem):"d0", "memory", "a0")
 
#define bclrl(bit, mem)   __asm__ __volatile__ ("moveal %1,%%a0\n\t" "move.l (%%a0),%%d0\n\t" "bclr.l %0,%%d0\n\t" "move.l %%d0,(%%a0)\n\t"::"n"(bit),"m"(mem):"d0", "memory", "a0")
 
#define cli()   __asm__ __volatile__ ( "move.w %%sr, %%d0 \n\t ori.l #0x0700,%%d0 \n\t move.w %%d0, %%sr \n\t" : : : "d0", "memory")
 
#define exit(status)   _exit(status)
 
#define sti()   asm volatile ( "move.w %%sr, %%d0 \n\t andi.l #0xF8FF,%%d0 \n\t move.w %%d0, %%sr \n\t" : : : "d0", "memory")
 

'typedefs'

typedef signed char BYTE
 
typedef unsigned char UBYTE
 
typedef signed short int WORD
 
typedef unsigned short int UWORD
 
typedef signed long int LONG
 
typedef unsigned long int ULONG
 
typedef unsigned int UINT
 
typedef unsigned int size_t
 

Enumeraciones

enum  BOOL { TRUE =1, FALSE =0 }
 
enum  PAR_IMPAR { IMPAR =1, PAR =0 }
 

Funciones

INLINE void _exit (int status)
 
INLINE char inch (void)
 
INLINE char inche (void)
 
INLINE void outch (char ch)
 
void outNum (UINT base, long num, UBYTE opciones)
 
void outNumDec (UINT base, double n, UINT dec, UBYTE opciones)
 
INLINE void output (char *start)
 
INLINE void retardo (UINT microsegundos)
 
INLINE LONG _strlen (char *st)
 
INLINE void * memcpy (void *dest, const void *src, size_t num)
 
INLINE void * memset (void *buffer, int c, size_t num)
 
void _prep_TOUT0 (void)
 
void _prep_TOUT1 (void)
 
void _prep_TOUT2 (void)
 
void _prep_TOUT3 (void)
 
void _prep_TIN0 (void)
 
void _prep_INT3 (void)
 
void _prep_INT2 (void)
 
void _prep_INT1 (void)
 
void __init (void)
 Rutina de inicio. Más...
 
void bucleMain (void)
 Programa principal. Más...
 
void rutina_int1 (void)
 Definición de rutinas de atención a la interrupción Más...
 
void rutina_int2 (void)
 
void rutina_int3 (void)
 
void rutina_int4 (void)
 
void rutina_tout0 (void)
 Rutina de atención a la interrupción de 4000 Hz. Más...
 
void rutina_tout1 (void)
 
void rutina_tout2 (void)
 
void rutina_tout3 (void)
 

Documentación de los 'defines'

#define ACCESO_A_MEMORIA_LONG (   dir)    (*(ULONG *)(dir))
#define bclrb (   bit,
  mem 
)    __asm__ __volatile__ ("bclr.b %0,%1"::"n"(bit),"m"(mem))
#define bclrl (   bit,
  mem 
)    __asm__ __volatile__ ("moveal %1,%%a0\n\t" "move.l (%%a0),%%d0\n\t" "bclr.l %0,%%d0\n\t" "move.l %%d0,(%%a0)\n\t"::"n"(bit),"m"(mem):"d0", "memory", "a0")
#define bsetb (   bit,
  mem 
)    __asm__ __volatile__ ("bset.b %0,%1"::"n"(bit),"m"(mem))
#define bsetl (   bit,
  mem 
)    __asm__ __volatile__ ("moveal %1,%%a0\n\t" "move.l (%%a0),%%d0\n\t" "bset.l %0,%%d0\n\t" "move.l %%d0,(%%a0)\n\t"::"n"(bit),"m"(mem):"d0", "memory", "a0")
#define cli ( )    __asm__ __volatile__ ( "move.w %%sr, %%d0 \n\t ori.l #0x0700,%%d0 \n\t move.w %%d0, %%sr \n\t" : : : "d0", "memory")
#define exit (   status)    _exit(status)
#define INLINE
#define MAYUSC   2
#define RET_15MS   15000
#define RET_1S   1000000
#define RET_3MS   3000
#define SIN_SIGNO   1
#define sti ( )    asm volatile ( "move.w %%sr, %%d0 \n\t andi.l #0xF8FF,%%d0 \n\t move.w %%d0, %%sr \n\t" : : : "d0", "memory")

Documentación de los 'typedefs'

typedef signed char BYTE
typedef signed long int LONG
typedef unsigned int size_t
typedef unsigned char UBYTE
typedef unsigned int UINT
typedef unsigned long int ULONG
typedef unsigned short int UWORD
typedef signed short int WORD

Documentación de las enumeraciones

enum BOOL
Valores de enumeraciones
TRUE 
FALSE 
enum PAR_IMPAR
Valores de enumeraciones
IMPAR 
PAR 

Documentación de las funciones

void __init ( void  )

Rutina de inicio.

INLINE void _exit ( int  status)
void _prep_INT1 ( void  )
void _prep_INT2 ( void  )
void _prep_INT3 ( void  )
void _prep_TIN0 ( void  )
void _prep_TOUT0 ( void  )
void _prep_TOUT1 ( void  )
void _prep_TOUT2 ( void  )
void _prep_TOUT3 ( void  )
INLINE LONG _strlen ( char *  st)
void bucleMain ( void  )

Programa principal.

INLINE char inch ( void  )
INLINE char inche ( void  )
INLINE void* memcpy ( void *  dest,
const void *  src,
size_t  num 
)
INLINE void* memset ( void *  buffer,
int  c,
size_t  num 
)
INLINE void outch ( char  ch)
void outNum ( UINT  base,
long  num,
UBYTE  opciones 
)
void outNumDec ( UINT  base,
double  n,
UINT  dec,
UBYTE  opciones 
)
INLINE void output ( char *  start)
INLINE void retardo ( UINT  microsegundos)
void rutina_int1 ( void  )

Definición de rutinas de atención a la interrupción

void rutina_int2 ( void  )
void rutina_int3 ( void  )
void rutina_int4 ( void  )
void rutina_tout0 ( void  )

Rutina de atención a la interrupción de 4000 Hz.

void rutina_tout1 ( void  )
void rutina_tout2 ( void  )
void rutina_tout3 ( void  )