Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 1.89 KB

2.2.0_Common_Devices.md

File metadata and controls

51 lines (42 loc) · 1.89 KB

uCISC Programming Guide

  1. Getting Started
    1. Configuring IntelliJ
    2. Configuring VIM
    3. Compiling uCISC Code
    4. Using the uCISC Simulator
    5. Using the uCISC Soft Core
  2. Introduction to Programming With uCISC
    1. Accessing External Devices
    2. Common Devices <-- you are here
      1. GPIO
      2. I2C
      3. UART
      4. Video Devices
    3. Advanced uCISC Programming Techniques
  3. uCISC Syntax Quick Reference
  4. Standard Libraries
  5. Instruction Set Details

Standard Device Control

The control segment layout is as follows:

  • 0x0 - Device ID - read only. Unique system wide.
  • 0x1 - Flags (MSB) | Device type (LSB) - read only
  • 0x2 to 0xF - Device type specific (see below)

The device ID can be used to uniquely identify a device system wide if it is mapped to more than one processor. This limits systems to 2^16 - 1 unique devices since device 0 is an invalid ID.

Device Types

  • 0x00 - Missing/Invalid
  • 0x01 - Processor
  • 0x02 - Block memory device
  • 0x03 - Block I/O device
  • 0x04 - Serial device (including UART)
  • 0x05 - Human interface device
  • 0x06 - Terminal device
  • 0x07 - Raster graphics device
  • 0x08 - GPIO device
  • 0x09 - I2C device
  • 0x0A - SPI device
  • 0x08 to 0xFF - TBD

Device Flags

The device flags are mapped to the upper byte of the second device word. The lower device word is the device type.