odroidc1

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package odroidc1 contains header definitions for Hardkernel's ODROID C0, C1, and C1+ boards.

These boards use an Amlogic S805 processor (called "meson_8b" in the linux kernel). Currently no package for memory-mapped I/O has been written for this processor, thus all gpio functions are implemented via sysfs.

This package only exports the main J2 header, which is rPi compatible except for a couple of analog pins (which are not currently supported). The J2 header has two I²C buses on header pins 3/5 and 27/28, the I²C functionality can be enabled by loading the aml_i2c kernel module. It has one SPI bus on header pins 19/21/23/24. The onewire gpio driver appears to be loaded by default on header pin 7.

References

Product page: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143703355573&tab_idx=2

Hardware wiki: http://odroid.com/dokuwiki/doku.php?id=en:c1_hardware

Ubuntu drivers: http://odroid.com/dokuwiki/doku.php?id=en:odroid-c1#ubuntu

Index

Constants

This section is empty.

Variables

View Source
var (
	J2_1             = pin.V3_3     // 3.3V; max 30mA
	J2_2             = pin.V5       // 5V (after filtering)
	J2_3  gpio.PinIO = gpio.INVALID // I2C1_SDA
	J2_4             = pin.V5       // 5V (after filtering)
	J2_5  gpio.PinIO = gpio.INVALID // I2C1_SCL
	J2_6             = pin.GROUND   //
	J2_7  gpio.PinIO = gpio.INVALID // GPCLK0
	J2_8  gpio.PinIO = gpio.INVALID // UART0_TXD, UART1_TXD
	J2_9             = pin.GROUND   //
	J2_10 gpio.PinIO = gpio.INVALID // UART0_RXD, UART1_RXD
	J2_11 gpio.PinIO = gpio.INVALID // UART0_RTS, SPI1_CS1, UART1_RTS
	J2_12 gpio.PinIO = gpio.INVALID // PCM_CLK, SPI1_CS0, PWM0_OUT
	J2_13 gpio.PinIO = gpio.INVALID // GPIO116
	J2_14            = pin.GROUND   //
	J2_15 gpio.PinIO = gpio.INVALID // GPIO115
	J2_16 gpio.PinIO = gpio.INVALID // GPIO104
	J2_17            = pin.V3_3     //
	J2_18 gpio.PinIO = gpio.INVALID // GPIO102
	J2_19 gpio.PinIO = gpio.INVALID // SPI0_MOSI
	J2_20            = pin.GROUND   //
	J2_21 gpio.PinIO = gpio.INVALID // SPI0_MISO
	J2_22 gpio.PinIO = gpio.INVALID // GPIO103
	J2_23 gpio.PinIO = gpio.INVALID // SPI0_SCLK
	J2_24 gpio.PinIO = gpio.INVALID // SPI0_CS0
	J2_25            = pin.GROUND   //
	J2_26 gpio.PinIO = gpio.INVALID // SPI0_CE1
	J2_27 gpio.PinIO = gpio.INVALID // I2C0_SDA
	J2_28 gpio.PinIO = gpio.INVALID // I2C0_SCL
	J2_29 gpio.PinIO = gpio.INVALID // GPCLK1
	J2_30            = pin.GROUND   //
	J2_31 gpio.PinIO = gpio.INVALID // GPCLK2
	J2_32 gpio.PinIO = gpio.INVALID // PWM0_OUT
	J2_33 gpio.PinIO = gpio.INVALID // PWM1_OUT
	J2_34            = pin.GROUND   //
	J2_35 gpio.PinIO = gpio.INVALID // PCM_FS, SPI1_MISO, PWM1_OUT
	J2_36 gpio.PinIO = gpio.INVALID // UART0_CTS, SPI1_CE2, UART1_CTS
	J2_37            = pin.INVALID  // BUG(tve): make pins J2_37 and J2_40 functional once analog support is implemented
	J2_38            = pin.V1_8     //
	J2_39            = pin.GROUND   //
	J2_40            = pin.INVALID  // See above.
)

The J2 header is rPi compatible, except for the two analog pins and the 1.8V output.

Functions

func Present

func Present() bool

Present returns true if running on a Hardkernel ODROID-C0/C1/C1+ board.

It looks for "8726_M8B" in the device tree or "ODROIDC" in cpuinfo. The following information is expected in the device dtree:

root@odroid:/proc/device-tree# od -c compatible
0000000   A   M   L   O   G   I   C   ,   8   7   2   6   _   M   8   B

Types

This section is empty.

Notes

Bugs

  • make pins J2_37 and J2_40 functional once analog support is implemented

Directories

Path Synopsis
Package odroidc1smoketest is leveraged by periph-smoketest to verify that basic ODROID-C1 specific functionality works.
Package odroidc1smoketest is leveraged by periph-smoketest to verify that basic ODROID-C1 specific functionality works.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL