Commit Graph

91 Commits

Author SHA1 Message Date
Aleksei Fedotov
b79c58a7a3 Use physical PIN number in blinker example.
The behavior of the test is not changed, now it hides BCM bin number and
used physical PIN number.
2020-04-26 18:54:01 +02:00
Aleksei Fedotov
904f4f9711 Add conversion from physical PIN to BCM notation.
On Open() detect the board model and configure how physical PINs are
mapped to GPIO pin numbers [1].

Model detection is based on content of
/sys/firmware/devicetree/base/model [2] . If you are running a weird or
very old system which does not have the file, GetBoardPin() won't work.

[1] https://pinout.xyz/
[2] https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
2020-04-26 18:54:01 +02:00
Stian Eikeland
a36b96d0b1
Merge pull request #41 from CodeLingoBot/rewrite
Fix function comments based on best practices from Effective Go
2019-02-14 22:39:46 +01:00
CodeLingo Bot
0720c3a89d Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-14 20:50:48 +00:00
Stian Eikeland
d43a3ce818
v4.4.0 2018-12-03 00:18:58 +01:00
Stian Eikeland
31e2cec6d2
Merge pull request #37 from stianeikeland/feature/irq-enable-disable
Feature/irq enable disable
2018-12-03 00:15:01 +01:00
Drahoslav
84326092ab Disable gpio IRQ on Detect edge 2018-12-01 15:59:22 +01:00
Drahoslav
631591fc01 Add IRQ enable/disable 2018-12-01 05:28:32 +01:00
Stian Eikeland
579db243a0
Update usage example: Use /v4 in import 2018-11-30 15:01:09 +01:00
Stian Eikeland
1fd77dd987
Specify major version in go.mod 2018-11-30 14:51:52 +01:00
Stian Eikeland
ac4019c8de
Release 4.3.0 - SPI 2018-11-29 17:38:40 +01:00
Stian Eikeland
0f7b17862c Added go.mod 2018-11-29 17:32:58 +01:00
Stian Eikeland
23a42cad9b
Added a SPI usage example 2018-11-29 17:29:11 +01:00
Stian Eikeland
0811a9f862 Added SPI documentation (copied from PR) 2018-11-29 17:03:49 +01:00
Stian Eikeland
14a5036b21
Merge pull request #31 from Drahoslav7/feature/spi
SPI support
2018-11-29 16:34:33 +01:00
Drahoslav
473106cc71 Add clockmode and cspolarity SPI settings 2018-11-28 10:22:36 +01:00
Drahoslav
794e6ddd7e Improve doc 2018-11-28 10:22:30 +01:00
Drahoslav
7d2387e2cc Define 3 SPI transfering functions, and other minor changes 2018-11-28 10:20:34 +01:00
Stian Eikeland
019f406b49
Update Readme - v4.2.0 2018-10-09 11:56:17 +02:00
Stian Eikeland
2c2ef096f8
Merge pull request #29 from Drahoslav7/perf/gpio-write
Perf/gpio - faster write and toggle
2018-10-09 11:54:54 +02:00
Drahoslav
094a866c10 Implement basic SPI 2018-10-04 23:20:31 +02:00
Drahoslav
6c29b50033 Update benchmark 2018-06-07 01:06:07 +02:00
Drahoslav
b1b8e25712 Improve performance of WritePin 2018-06-07 01:06:07 +02:00
Drahoslav
a69ebca5ea Improve performance of pintoggle 2018-06-07 01:06:07 +02:00
Drahoslav
47a3130f54 Minor change in edge event detection api
Also other minor changes and gofmt
2018-06-07 01:06:07 +02:00
Stian Eikeland
3abdd2207d
Release 4.1.0 - With support for edge detection 2018-06-07 00:43:49 +02:00
Stian Eikeland
4f808926bf
Merge pull request #22 from Drahoslav7/feature/edge-event
Edge detection, closes #21
2018-06-07 00:40:09 +02:00
Drahoslav
3084a4df91 Improve doc of edge detection 2018-06-06 17:54:16 +02:00
Drahoslav
250b0836f8 Improve event unit test 2018-06-06 17:51:04 +02:00
Drahoslav
4ae1cfd964 Minor change in edge event detection api
Also other minor changes and gofmt
2018-06-06 13:34:52 +02:00
Drahoslav
9e67063fd5 Edge event example 2018-06-04 17:14:12 +02:00
Drahoslav
22c39c30df Fix falling edge detection 2018-06-04 16:32:46 +02:00
Drahoslav
46ba7f5934 Test edge events 2018-06-04 16:29:39 +02:00
Drahoslav
2ec057fd07 Impelement edge event detection 2018-06-04 14:46:15 +02:00
Stian Eikeland
f6236e5866
Merge pull request #17 from Drahoslav7/fix-close-func
Add missing unmap to Close
2018-01-15 17:23:40 +01:00
Drahoslav
544f9accf1 Add missing unmap to Close 2018-01-12 15:55:26 +01:00
Stian Eikeland
636800e482
Merge pull request #16 from Drahoslav7/improve-pwm-example
Improve pwm example
2018-01-12 15:44:00 +01:00
Drahoslav
1272e9a954 Improve pwm example 2018-01-12 15:35:22 +01:00
Stian Eikeland
15b37924a8
Add link to godoc.org in readme 2018-01-12 13:20:14 +01:00
Stian Eikeland
a6b0dffd47 PWM example by @Drahoslav7c 2018-01-12 01:16:40 +01:00
Stian Eikeland
4e5f1593d7 Update readme (PWM / Clock) 2018-01-12 01:13:42 +01:00
Stian Eikeland
ca7ded7fea
PWM and Clock modes from @Drahoslav7
Implement clock and pwm modes
2018-01-12 01:05:43 +01:00
Drahoslav Bednář
46ab34d51a
Merge pull request #1 from Drahoslav7/pwm
Pwm
2017-11-20 12:41:54 +01:00
Drahoslav
ec49196c8c Update doc overview 2017-11-20 12:14:52 +01:00
Drahoslav
a1c4bb376e Improve doc 2017-11-20 10:26:42 +01:00
Drahoslav
b1c90c6087 Fix pwmMem and some pwm Regs 2017-11-20 09:29:43 +01:00
Drahoslav
7445bb69a5 Implement pwm methods 2017-11-19 17:23:48 +01:00
Drahoslav
cc678981b0 Mmap pwm memmory 2017-11-17 09:37:18 +01:00
Drahoslav
4a31f2cfa6 Add Pwm mode for pins 2017-11-17 03:03:19 +01:00
Drahoslav
c0dfd7a7e3 fixup! Use mash filter if it makes sense 2017-11-16 13:52:24 +01:00