exti

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package exti provides an interface to the External Interrupt/event controller.

All functions in this package except Connect support concurrent access to different EXTI lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lines

type Lines lines

Lines is bitmask that represents EXTI input lines.

const (
	L0 Lines = 1 << iota
	L1
	L2
	L3
	L4
	L5
	L6
	L7
	L8
	L9
	L10
	L11
	L12
	L13
	L14
	L15

	PVD Lines = 1 << 16 // Programmable Voltage Detector output.
)

func EventEnabled

func EventEnabled() Lines

EventEnabled returns lines that have event generation enabled.

func FallTrigEnabled

func FallTrigEnabled() Lines

FallTrigEnabled returns lines that have falling edge detection enabled.

func IRQEnabled

func IRQEnabled() Lines

IRQEnabled returns lines that have IRQ generation enabled.

func LineIndex

func LineIndex(id int) Lines

LineIndex returns bitmask for id EXTI line.

func Pending

func Pending() Lines

Pending returns lines that have pending interrupt flag set.

func RiseTrigEnabled

func RiseTrigEnabled() Lines

RiseTrigEnabled returns lines that have rising edge detection enabled.

func (Lines) ClearPending

func (li Lines) ClearPending()

ClearPending clears pending interrupt flag for lines.

func (Lines) Connect

func (li Lines) Connect(port *gpio.Port)

Connect connects lines to corresponding pins of GPIO port. After reset lines 0..15 are connected to GPIO port A.

Connect enables AFIO/SYSCFG clock before configuration and disables it before return. It can not be called concurently with any other function (including itself) that enables/disables AFIO/SYSCFG.

func (Lines) DisableEvent

func (li Lines) DisableEvent()

DisableEvent disable event generation by lines.

func (Lines) DisableFallTrig

func (li Lines) DisableFallTrig()

DisableFallTrig disables falling edge detection for lines.

func (Lines) DisableIRQ

func (li Lines) DisableIRQ()

DisableInt disable IRQ generation by lines.

func (Lines) DisableRiseTrig

func (li Lines) DisableRiseTrig()

DisableRiseTrig disables rising edge detection for lines.

func (Lines) EnableEvent

func (li Lines) EnableEvent()

EnableEvent enables event generation by lines.

func (Lines) EnableFallTrig

func (li Lines) EnableFallTrig()

EnableFallTrig enables falling edge detection for lines.

func (Lines) EnableIRQ

func (li Lines) EnableIRQ()

EnableInt enables IRQ generation by lines.

func (Lines) EnableRiseTrig

func (li Lines) EnableRiseTrig()

EnableRiseTrig enables rising edge detection for lines.

func (Lines) Trigger

func (li Lines) Trigger()

Trig allows to trigger an interrupt/event request by software. Interrupt pending flag on the line is set only when interrupt generation is enabled for this line.

Jump to

Keyboard shortcuts

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