rcs620s

package module
v0.0.0-...-e2ae513 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rcs620s

A sample implementation for using RC-S620/S by golang.

To use this on raspberry pi, you need wiring RC-S620/S and need configuring raspberry pi to use some pinouts as uart.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidResponse = errors.New("invalid response")
)

Functions

This section is empty.

Types

type Datalink struct {
	// contains filtered or unexported fields
}
func NewDatalink(deviceFile string) (*Datalink, error)

func (*Datalink) Close

func (d *Datalink) Close() error

func (*Datalink) ReadFrame

func (d *Datalink) ReadFrame() (frame.Packet, error)

func (*Datalink) Request

func (d *Datalink) Request(packet packet.Payload) (packet.Payload, error)

func (*Datalink) WriteACK

func (d *Datalink) WriteACK() error

func (*Datalink) WriteByte

func (d *Datalink) WriteByte(f []byte) (int, error)

func (*Datalink) WriteFrame

func (d *Datalink) WriteFrame(f frame.Packet) error

func (*Datalink) WritePacket

func (d *Datalink) WritePacket(f packet.Payload) error

type RCS620S

type RCS620S struct {
	Datalink *Datalink
	// contains filtered or unexported fields
}

func New

func New(deviceFile string) (*RCS620S, error)

func (*RCS620S) ApplyInListPassiveTargetWorkaround

func (r *RCS620S) ApplyInListPassiveTargetWorkaround() (bool, error)

ApplyInListPassiveTargetWorkaround fixes no response issue. Read section 9 in below document for more details. https://www.sony.co.jp/Products/felica/business/tech-support/data/fp_rcs620s_command_2.11.pdf

func (*RCS620S) Close

func (r *RCS620S) Close() error

func (*RCS620S) CloseCommunication

func (r *RCS620S) CloseCommunication() error

func (*RCS620S) FirmwareVersion

func (r *RCS620S) FirmwareVersion() (*response.GetFirmwareVersion, error)

FirmwareVersion gets firmware version of RCS620S

func (*RCS620S) GeneralStatus

func (r *RCS620S) GeneralStatus() (*response.GetGeneralStatus, error)

GeneralStatus gets general status of RCS620S

func (*RCS620S) ImproveNoiseImmunity

func (r *RCS620S) ImproveNoiseImmunity() error

ImproveNoiseImmunity improves noise immunity. Read section 9 in below document for more details. https://www.sony.co.jp/Products/felica/business/tech-support/data/fp_rcs620s_command_2.11.pdf

func (*RCS620S) InListPassiveTarget

func (r *RCS620S) InListPassiveTarget(brty request.BRTYType, initiatorData []byte) (*response.InListPassiveTarget, error)

InListPassiveTarget detects a card

func (*RCS620S) InitializeAsInitiator

func (r *RCS620S) InitializeAsInitiator() error

InitializeAsInitiator initializes RCS620 to run as initiator mode.

func (*RCS620S) Reset

func (r *RCS620S) Reset() error

Reset resets RCS620S. This method improves noise immunity at the same time.

func (*RCS620S) SetAntenna

func (r *RCS620S) SetAntenna(enable bool) error

SetAntenna enables or disables antenna

Directories

Path Synopsis
cmd
entry command
trigger command
uidreader command

Jump to

Keyboard shortcuts

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