Nic0w
2462c430b9
Fix typo on post_div check
...
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 19:48:09 +02:00
Nic0w
c3bc1bbaf8
Fix type conversion issue
2021-04-25 19:45:45 +02:00
Jennifer Wilcox
e9721e14c2
Pin ubuntu version
2021-04-25 12:24:47 -05:00
Jennifer Wilcox
c4ae152fda
Update rp2040-hal/src/gpio.rs
...
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 12:17:05 -05:00
Jennifer Wilcox
eaea9ae1ed
Concentrate the unsafe register constructs
...
This moves almost all of the unsafe stuff together. The last remaining bit is going to need a PAC fix.
2021-04-25 12:13:44 -05:00
Jennifer Wilcox
8290368c10
Pull pads out of reset and wait
...
We're technically supposed to wait for these resets to finish before poking at registers. This seems to fix the instability I was seeing on the input example especially (TBH I have no idea how it ever worked)
2021-04-25 11:43:44 -05:00
Jennifer Wilcox
7e45c96a65
Do reset in a good way instead of a wacky way
2021-04-25 11:17:33 -05:00
Jennifer Wilcox
b3b7677f82
More review comments
2021-04-25 11:13:21 -05:00
Nic0w
6157ce552f
Move PLL parameters into a struct to help testability and reconfiguration of the PLL.
2021-04-25 17:51:03 +02:00
Jennifer Wilcox
037fc665b2
Apply suggestions from code review
...
Co-authored-by: tdittr <tdittr@users.noreply.github.com>
2021-04-25 10:15:32 -05:00
Nic0w
2a704a73f0
Adding blocking helper method to setup the XOSC easily.
2021-04-25 16:34:48 +02:00
Nic0w
b9080d0a92
Working implementation of an UART HAL.
2021-04-25 10:51:46 +02:00
Nic0w
ff418b0453
Working implementation of a PLL HAL.
2021-04-25 10:12:38 +02:00
Nic0w
b0de7c9be6
Ignores Cargo.lock and target/*.
2021-04-25 09:46:53 +02:00
Nic0w
8f6aea6a31
Fix compilation issues.
2021-04-25 09:03:20 +02:00
Nic0w
72694a07b5
Fix frequency range check.
2021-04-25 08:58:43 +02:00
Jennifer Wilcox
cb51448089
Apply suggestions from code review
...
Co-authored-by: Émile Grégoire <eg@emilegregoire.ca>
2021-04-24 20:17:42 -05:00
Jennifer Wilcox
cc1a1bee2c
Also build all examples
...
My other PR has some examples. It turns out `cargo check --all` doesn't
actually check _all_ buildable things :(
2021-04-24 18:46:07 -05:00
Jennifer Wilcox
422a45fbc5
Add documentation
2021-04-24 18:41:12 -05:00
Jennifer Wilcox
94f67f7eca
Finish configuration options for IOs
2021-04-24 18:03:03 -05:00
Nic0w
d5cbd44ade
Fixing calculation bug pointed out by @tdittr
2021-04-25 00:36:46 +02:00
Jennifer Wilcox
3536604b9e
Block input reads on Unknown state
2021-04-24 17:28:33 -05:00
Nic0w
568cafe2d1
Multiple changes related to @tdittr 's comments
2021-04-24 23:38:49 +02:00
Jennifer Wilcox
2e5c1fc0e3
Cleanup wacky imports in examples
2021-04-24 16:22:27 -05:00
Jennifer Wilcox
2c3a0956fa
Add input support, examples, SIO/PADS ownership
...
Sorry this is a large commit :(
This adds support for input pins, including pulling them high or low.
It also adds two examples: the start of a classic blinky LED example, and an example for reading input.
2021-04-24 16:18:57 -05:00
Nic0w
ed1e847618
Remove line as it builds fine without it.
2021-04-24 22:26:26 +02:00
Jennifer Wilcox
5dfa550663
Pass --all to cargo check
...
This will be useful once we have examples, which I'm working on in
another PR.
2021-04-24 14:36:39 -05:00
Jennifer Wilcox
3c528c6a93
Remove Cargo.lock
2021-04-24 14:35:23 -05:00
Nic0w
d0d9291cde
Working HAL for the XOSC
2021-04-24 13:38:17 +02:00
Jennifer Wilcox
45580ec4c8
Add basic output support for GPIOs
2021-04-17 18:22:15 -05:00
Jennifer Wilcox
778a87dfaa
Also run the checks on PRs
...
I forgot you have to add that event explicitly.
2021-04-17 14:21:55 -05:00
Jennifer Wilcox
d318d05067
Run cargo fmt
2021-04-17 14:11:47 -05:00
Jennifer Wilcox
63607e5533
Add CI checks
2021-04-17 14:09:54 -05:00
Jonathan 'theJPster' Pallant
b96339c417
Merge pull request #20 from jannic/fix-rom-functions
...
Fix rom_table_lookup
2021-02-21 16:18:51 +00:00
Jan Niehusmann
5494ce7539
rom function git_revision() does return an u32, not a &str
2021-02-15 23:28:13 +00:00
Jan Niehusmann
d6231bd3ec
fix rom_table_lookup
...
It seems like the rom_table_lookup missed one level of
pointer dereferencing.
After comparing it to the working call to reset_usb_boot() in
https://github.com/jannic/rp-microcontroller-rs/blob/master/util/rp2040-panic-usb-boot/src/lib.rs ,
I changed the code until it generated basically the same assembly.
With that change, I was able to successfully call rom_data::reset_to_usb_boot()
I still don't like the type RomTableLookupFn, which just returns
some generic T without any checks, and I think rom_table_lookup
should be unsafe. But as none of those are pub, it doesn't matter too
much. So I just made the changes necessary to make the code work.
2021-02-15 22:16:43 +00:00
Evan Older
be7dd11057
Merge pull request #16 from rp-rs/rom-functions
...
rom: Make rom_funcs functions call function instead of returning it
2021-02-03 16:56:29 -05:00
Asaf Fisher
913c5fb0b2
rom: Fix type error
2021-02-03 21:49:48 +02:00
Asaf Fisher
1848789ca3
rom: Make rom_funcs functions call function instead of returning it
2021-02-03 21:43:14 +02:00
Evan Older
2972cfebcb
Merge pull request #15 from rp-rs/pi-workspace
...
build: Add workspaces to project
2021-02-03 14:04:57 -05:00
Asaf Fisher
e44d561ef2
build: Add workspaces to project
2021-02-03 21:00:45 +02:00
Evan Older
1744151025
Merge pull request #11 from devsnek/rom-stuff
...
Add rom stuff
2021-02-03 10:42:39 -05:00
Asaf Fisher
a9a8df8c79
rom: Add comments to rom content
2021-02-03 15:57:44 +02:00
Asaf Fisher
6eccce595c
rom: Change rom_table_lookup
to use the rom's built in one
2021-02-03 15:57:44 +02:00
Gus Caplan
1c75ed3844
rom: Add rom content
2021-02-03 03:10:00 +02:00
Evan Older
5159d04097
Merge pull request #3 from johnbatty/main
...
Add .cargo/config defining the build target
2021-01-28 16:44:21 -05:00
Evan Older
8ef2d6fbab
Rename CONTRIBUTING.md to CODE_OF_CONDUCT.md
2021-01-28 16:31:47 -05:00
Evan Older
713e7491b7
Create CONTRIBUTING.md
2021-01-28 16:31:32 -05:00
John Batty
0d228286cb
Add .cargo/config defining the build target
2021-01-28 21:17:10 +00:00
Evan Older
780917774e
Merge pull request #2 from rp-rs/eolder-skeleton
...
Added skeleton for HAL and updated readme
2021-01-25 15:46:55 -05:00