Commit Graph

53 Commits

Author SHA1 Message Date
Romain Doumenc
951bf2c8bd
Use the modern unsafe replacement of reflect
As of Go1.20, “safer” versions of pointer casting are available to point to the
same address. Use them.
2023-09-30 12:48:53 +01:00
youngkin
c34d95b74c add an example to test PWM balanced mode 2021-12-01 22:14:59 +00:00
youngkin
915fc229cf address code review comments 2021-12-01 21:22:34 +00:00
youngkin
02c0360e26 add support for PWM balanced mode 2021-11-03 17:44:36 +00:00
Adrian Batzill
43c0fe30e3 Fixed PI4 PWM frequency setting due to wrong oscillator frequency 2021-09-20 10:59:32 +02:00
Drahoslav Bednář
6ea7dcc05f
Fixes permission error
Closes #70
2021-08-19 02:37:13 +02:00
Drahoslav Bednář
acc952dac3
Merge pull request #56 from Nox-404/patch-2
Add altX modes for pins
2020-07-05 11:27:35 +02:00
Nox
4f671f7c24 Add altX modes for pins
Add support to set alt modes directly
2020-02-20 14:48:26 +01:00
Walt Drummond
9f58572951 Support Pi3 and earlier boards 2019-11-28 11:39:57 -08:00
Walt Drummond
10d3b57bb6 Updated Pull-up/Pull-down to support BCM2711 and PRi4 2019-11-27 12:39:38 -08:00
Walt Drummond
ed5c36b35a Updated to support Raspberry Pi 4 GPIO Base Address 2019-10-24 10:28:39 -07: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
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
Drahoslav
794e6ddd7e Improve doc 2018-11-28 10:22:30 +01:00
Drahoslav
094a866c10 Implement basic SPI 2018-10-04 23:20:31 +02:00
Drahoslav
3084a4df91 Improve doc of edge detection 2018-06-06 17:54:16 +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
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
Drahoslav
544f9accf1 Add missing unmap to Close 2018-01-12 15:55:26 +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
Drahoslav
7e21224c69 Do not change mash while busy 2017-11-16 01:47:08 +01:00
Drahoslav
ec703e92e8 Use /mem/dev primarily - it is needed for clock settings to work 2017-11-16 01:28:34 +01:00
Drahoslav
95bb91625f Use mash filter if it makes sense 2017-11-16 01:14:01 +01:00
Drahoslav
fd0764b709 Fix bad indexing of clk rigisters 2017-11-16 01:12:13 +01:00
Drahoslav Bednář
8208ca5f0d
fix memMap base attr
How could it even work before?
2017-11-15 17:48:18 +01:00
Drahoslav
0122f1902d Fix divf computation 2017-11-15 11:26:49 +01:00
Drahoslav
9b13a0969b Change clock public api 2017-11-14 23:16:39 +01:00
Drahoslav
cdcd97f287 go fmt 2017-11-14 22:33:04 +01:00
Drahoslav
b604d03178 Minor fixes 2017-11-14 22:25:26 +01:00
Drahoslav
b7b1bd8b81 Do minor renaming 2017-11-14 22:16:15 +01:00
Drahoslav
aae3fc6504 Implement setClock - using clock manager registers 2017-11-14 22:04:03 +01:00
Drahoslav
12feac8555 Add pin mode Clock 2017-11-14 17:52:05 +01:00
Drahoslav
3e0491354c Do minor refactoring 2017-11-14 17:06:00 +01:00
Artem Sheremet
f2af793fd7 Use /dev/gpiomem (with offset=0), if available
/dev/gpiomem is a map of GPIO-related memory region.
No longer need root for user GPIO access, but without relaxing
permissions on /dev/mem.

See https://github.com/raspberrypi/linux/pull/1112/files
2015-12-07 13:31:10 +01:00
Adam Kramer
07b12a1539 Removing a debugging statement 2015-03-07 19:01:39 -08:00
Adam Kramer
10a90652fd Fixed the comment for getGPIOBase() 2015-03-07 18:54:44 -08:00
Adam Kramer
733fee47fc Fixing a bug (oops) 2015-03-07 18:53:00 -08:00
Adam Kramer
cf3a8b7ed1 Using a better method of base address detection. 2015-03-07 18:45:00 -08:00
Adam Kramer
acd8baadbf Support the new IO port range for raspberry pi 2. 2015-03-07 17:57:06 -08:00
Kris Budde
8492756a0e Always unlock mutex. Just to be sure. 2014-08-23 14:43:15 +02:00
Stian Eikeland
1d8a97a9f8 Fix some comments 2014-01-07 23:15:25 +01:00