| NANO102/112 BSP V3.04.000 The Board Support Package for Nano102/112 Series

Modules | Macros | Typedefs
NANO102/112 I/O Routines
NANO102/112 Peripheral Memory Map » NANO102/112 Peripheral Declaration
Collaboration diagram for NANO102/112 I/O Routines:

## Modules
| NANO102/112 Legacy Constants

## Macros
#define | M8(addr) (*((vu8 *) (addr)))
| Get a 8-bit unsigned value from specified address. More...
#define | M16(addr) (*((vu16 *) (addr)))
| Get a 16-bit unsigned value from specified address. More...
#define | M32(addr) (*((vu32 *) (addr)))
| Get a 32-bit unsigned value from specified address. More...
#define | outpw(port, value) *((volatile unsigned int *)(port)) = value
| Set a 32-bit unsigned value to specified I/O port. More...
#define | inpw(port) (*((volatile unsigned int *)(port)))
| Get a 32-bit unsigned value from specified I/O port. More...
#define | outps(port, value) *((volatile unsigned short *)(port)) = value
| Set a 16-bit unsigned value to specified I/O port. More...
#define | inps(port) (*((volatile unsigned short *)(port)))
| Get a 16-bit unsigned value from specified I/O port. More...
#define | outpb(port, value) *((volatile unsigned char *)(port)) = value
| Set a 8-bit unsigned value to specified I/O port. More...
#define | inpb(port) (*((volatile unsigned char *)(port)))
| Get a 8-bit unsigned value from specified I/O port. More...
#define | outp32(port, value) *((volatile unsigned int *)(port)) = value
| Set a 32-bit unsigned value to specified I/O port. More...
#define | inp32(port) (*((volatile unsigned int *)(port)))
| Get a 32-bit unsigned value from specified I/O port. More...
#define | outp16(port, value) *((volatile unsigned short *)(port)) = value
| Set a 16-bit unsigned value to specified I/O port. More...
#define | inp16(port) (*((volatile unsigned short *)(port)))
| Get a 16-bit unsigned value from specified I/O port. More...
#define | outp8(port, value) *((volatile unsigned char *)(port)) = value
| Set a 8-bit unsigned value to specified I/O port. More...
#define | inp8(port) (*((volatile unsigned char *)(port)))
| Get a 8-bit unsigned value from specified I/O port. More...

## Typedefs
typedef volatile unsigned char | vu8
| Define 8-bit unsigned volatile data type. More...
typedef volatile unsigned short | vu16
| Define 16-bit unsigned volatile data type. More...
typedef volatile unsigned long | vu32
| Define 32-bit unsigned volatile data type. More...

## Detailed Description

The Declaration of NANO102/112 I/O routines

## Macro Definition Documentation

## ◆ inp16

#define inp16 | ( |  | port | ) | (*((volatile unsigned short *)(port)))

Get a 16-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 16-bit data from

Returns
  16-bit unsigned value stored in specified I/O port

Note
  The input port must be 16-bit aligned

Definition at line 10784 of file Nano1X2Series.h.

## ◆ inp32

#define inp32 | ( |  | port | ) | (*((volatile unsigned int *)(port)))

Get a 32-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 32-bit data from

Returns
  32-bit unsigned value stored in specified I/O port

Note
  The input port must be 32-bit aligned

Definition at line 10767 of file Nano1X2Series.h.

## ◆ inp8

#define inp8 | ( |  | port | ) | (*((volatile unsigned char *)(port)))

Get a 8-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 8-bit data from

Returns
  8-bit unsigned value stored in specified I/O port

Definition at line 10799 of file Nano1X2Series.h.

## ◆ inpb

#define inpb | ( |  | port | ) | (*((volatile unsigned char *)(port)))

Get a 8-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 8-bit data from

Returns
  8-bit unsigned value stored in specified I/O port

Definition at line 10750 of file Nano1X2Series.h.

## ◆ inps

#define inps | ( |  | port | ) | (*((volatile unsigned short *)(port)))

Get a 16-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 16-bit data from

Returns
  16-bit unsigned value stored in specified I/O port

Note
  The input port must be 16-bit aligned

Definition at line 10735 of file Nano1X2Series.h.

## ◆ inpw

#define inpw | ( |  | port | ) | (*((volatile unsigned int *)(port)))

Get a 32-bit unsigned value from specified I/O port.

Parameters

  [in] | port | Port address to get 32-bit data from

Returns
  32-bit unsigned value stored in specified I/O port

Note
  The input port must be 32-bit aligned

Definition at line 10718 of file Nano1X2Series.h.

## ◆ M16

#define M16 | ( |  | addr | ) | (*((vu16 *) (addr)))

Get a 16-bit unsigned value from specified address.

Parameters

  [in] | addr | Address to get 16-bit data from

Returns
  16-bit unsigned value stored in specified address

Note
  The input address must be 16-bit aligned

Definition at line 10693 of file Nano1X2Series.h.

## ◆ M32

#define M32 | ( |  | addr | ) | (*((vu32 *) (addr)))

Get a 32-bit unsigned value from specified address.

Parameters

  [in] | addr | Address to get 32-bit data from

Returns
  32-bit unsigned value stored in specified address

Note
  The input address must be 32-bit aligned

Definition at line 10701 of file Nano1X2Series.h.

## ◆ M8

#define M8 | ( |  | addr | ) | (*((vu8 *) (addr)))

Get a 8-bit unsigned value from specified address.

Parameters

  [in] | addr | Address to get 8-bit data from

Returns
  8-bit unsigned value stored in specified address

Definition at line 10685 of file Nano1X2Series.h.

## ◆ outp16

#define outp16 | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned short *)(port)) = value

Set a 16-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 16-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Note
  The output port must be 16-bit aligned

Definition at line 10776 of file Nano1X2Series.h.

## ◆ outp32

#define outp32 | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned int *)(port)) = value

Set a 32-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 32-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Note
  The output port must be 32-bit aligned

Definition at line 10759 of file Nano1X2Series.h.

## ◆ outp8

#define outp8 | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned char *)(port)) = value

Set a 8-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 8-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Definition at line 10792 of file Nano1X2Series.h.

## ◆ outpb

#define outpb | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned char *)(port)) = value

Set a 8-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 8-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Definition at line 10743 of file Nano1X2Series.h.

## ◆ outps

#define outps | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned short *)(port)) = value

Set a 16-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 16-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Note
  The output port must be 16-bit aligned

Definition at line 10727 of file Nano1X2Series.h.

## ◆ outpw

#define outpw | ( |  | port,
|  |  | value
| ) |  | *((volatile unsigned int *)(port)) = value

Set a 32-bit unsigned value to specified I/O port.

Parameters

  [in] | port | Port address to set 32-bit data
  [in] | value | Value to write to I/O port

Returns
  None

Note
  The output port must be 32-bit aligned

Definition at line 10710 of file Nano1X2Series.h.

## Typedef Documentation

## ◆ vu16

typedef volatile unsigned short vu16

Define 16-bit unsigned volatile data type.

Definition at line 10677 of file Nano1X2Series.h.

## ◆ vu32

typedef volatile unsigned long vu32

Define 32-bit unsigned volatile data type.

Definition at line 10678 of file Nano1X2Series.h.

## ◆ vu8

typedef volatile unsigned char vu8

Define 8-bit unsigned volatile data type.

Definition at line 10676 of file Nano1X2Series.h.