nec

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Code for both the NEC32 protocol and the Legacy AppleTV protocols

Index

Constants

View Source
const (
	// state
	STATE_EXPECT_HEADER_PULSE state = iota
	STATE_EXPECT_HEADER_SPACE
	STATE_EXPECT_PULSE
	STATE_EXPECT_SPACE
	STATE_EXPECT_END_PULSE
	STATE_EXPECT_TRAIL_SPACE_17500
	STATE_EXPECT_TRAIL_SPACE_35000
	STATE_EXPECT_REPEAT_SPACE
	STATE_EXPECT_REPEAT_PULSE
)
View Source
const (
	TOLERANCE    = 35 // 35% tolerance on values
	APPLETV_CODE = 0x77E1
)

Variables

View Source
var (
	HEADER_PULSE      = remotes.NewMarkSpace(gopi.LIRC_TYPE_PULSE, 9000, TOLERANCE) // 9ms
	HEADER_SPACE      = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 4500, TOLERANCE) // 4.5ms
	BIT_PULSE         = remotes.NewMarkSpace(gopi.LIRC_TYPE_PULSE, 562, TOLERANCE)  // 650ns
	ONE_SPACE         = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 1688, TOLERANCE) // 1.6ms
	ZERO_SPACE        = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 562, TOLERANCE)
	TRAIL_PULSE       = remotes.NewMarkSpace(gopi.LIRC_TYPE_PULSE, 562, TOLERANCE)
	TRAIL_SPACE_17500 = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 17500, TOLERANCE) // 17.5ms
	TRAIL_SPACE_35000 = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 35000, TOLERANCE) // 35ms
	REPEAT_PULSE      = remotes.NewMarkSpace(gopi.LIRC_TYPE_PULSE, 9000, TOLERANCE)  // 9ms
	REPEAT_SPACE      = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 2500, TOLERANCE)
	REPEAT_SPACE2     = remotes.NewMarkSpace(gopi.LIRC_TYPE_SPACE, 96577, TOLERANCE)
)

Functions

This section is empty.

Types

type Codec

type Codec struct {
	LIRC gopi.LIRC
	Type remotes.CodecType
}

NEC Configuration - NEC32 is supported

func (Codec) Open

func (config Codec) Open(log gopi.Logger) (gopi.Driver, error)

Jump to

Keyboard shortcuts

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