Commit Graph

55 Commits

Author SHA1 Message Date
Geert Stappers 6fec9ca38f features removed
as adviced by
  rustc --explain E0557
2022-06-08 12:21:34 +02:00
Dylan McKay f973881e60 Add 'avr_delay' as a dependency and expose crate 2021-02-02 01:50:14 +13:00
Dylan McKay 8d3c2466ce Use 'avr-config' for CPU frequency logic rather than reimplement it
This crate is also used by the 'delay' crate.
2021-02-02 01:45:41 +13:00
Dylan McKay 372f774176 Run re-generate MCU cores script 2021-01-29 20:44:08 +13:00
Dylan McKay fc6531296a Fix a 'invalid URL' rustdoc warning 2021-01-29 20:44:08 +13:00
Dylan McKay 9fbcff1f45 Regenerate the core files, committing them to VCS for the first time 2021-01-29 20:44:08 +13:00
Dylan McKay ccad9c169b Stop autogenerating config.rs file 2021-01-29 20:44:08 +13:00
Dylan McKay 0311381490 Remove autogenerated files from .gitignore file
Keep them in version control from now on.
2021-01-29 20:44:08 +13:00
Dylan McKay 79dd2543a1 Use volatile write operation for 'set_mask_raw' function
The other methods had previously been updated to use volatile memops,
but due to an oversight this method was missed.

Fixes avr-rust/ruduino#31.

Thanks to @MalteT for reporting this issue.
2020-10-30 01:04:47 +13:00
Paul Daniel Faria c11738600f Export ClockSource and WaveformGenerationMode for each timer 2020-08-24 20:48:32 +12:00
Dylan McKay 3868326bca Replace regular memory read/writes with volatile memory read/writes
Fixes #21.
2020-07-31 22:04:16 +12:00
Jake Goulding fe0720d53e Always inline disabling interrupts
It never makes sense to call a function for these two instructions.

Additionally, I use this at system boot time to configure the stack
pointer itself. If this becomes a function call, then _everything_ is
broken!
2020-07-26 03:25:21 +12:00
Jake Goulding 74a824ba29
Merge pull request #25 from shepmaster/from-vs-into
Prefer implementing From instead of Into
2020-07-25 11:15:46 -04:00
Dylan McKay 9904454521 Make the 'avr-std-stub' dependency optional
This way, downstream users may user their own panic handlers and
exception handling personality functions if they desire.
2020-07-26 03:08:40 +12:00
Jake Goulding c02a95baa5 Make the std-stub optional
This allows people to provide their own `panic_handler`
2020-07-25 10:05:35 -04:00
Jake Goulding 3148d18363 Prefer implementing From instead of Into 2020-07-25 10:04:35 -04:00
Dylan McKay 869113a693 Use the std stub definitions from the 'avr-std-stub' crate 2020-07-26 00:33:58 +12:00
Dylan McKay 6dfffaa3f9 Factor the 'std_stub' module out into the 'avr-std-stub' crate
This way it can be reused by other crates.
2020-07-26 00:24:09 +12:00
Dylan McKay 2a3bcbda02 Fix device detection logic 2020-07-25 01:57:04 +12:00
Jérémie Drouet e6cc6005ef
Add missing public new function for Timer16
This function is public for `Timer8`
2020-07-22 22:37:25 +02:00
Dylan McKay 0963ff0f7f Switch the crate to Rust edition '2018' 2020-06-20 06:03:43 +12:00
Dylan McKay d85627612e Remove the 'panic_handler' feature from crate attributes
The feature has been stabilized for quite a while now.
2020-06-20 05:59:48 +12:00
Dylan McKay 181a0b7214 Update uses of the deprecated 'asm!' macro to 'llvm_asm!' 2020-06-20 05:57:37 +12:00
Dylan McKay 49a34da4e2 Fixes from incorrect rebase 2018-11-05 23:37:50 +13:00
Dylan McKay 3fbe33504a Fixes 2018-11-05 23:35:46 +13:00
Dylan McKay aecd4edb36 Rename Mask to RegisterBits
This is much more intuitive.
2018-11-05 23:32:51 +13:00
Dylan McKay f90d5b2d0b Clean up the documentation and public exports
The interrupt helper struct does not need to be public.

Add some documentation to a bunch of types.
2018-11-05 23:32:51 +13:00
Dylan McKay f94b23ed1d Use the new panic handler feature
The "panic_fmt" lang item no longer exists; it has been replaced with
the unstable feature #[panic_handler]
2018-11-05 23:32:51 +13:00
Dylan McKay 4b451634e7 Rename AVR_FREQUENCY to AVR_FREQUENCY_HZ
A bit less ambiguous.
2018-11-05 23:32:51 +13:00
Dylan McKay 2b58e36065 Add documentation 2018-11-05 23:32:51 +13:00
Dylan McKay 61c62ad0ed Merge Mask and Bitset, remove Bitset
There isn't as much value as I thought in making the distinction.
2018-11-05 23:32:51 +13:00
Dylan McKay c5946dc846 Remove all compiler warnings 2018-11-05 23:32:39 +13:00
Dylan McKay d3d41e457a Silence the half-written module 2018-11-05 23:32:39 +13:00
Dylan McKay 3e29e87d38 Rename ADDR to ADDRESS 2018-11-05 23:32:39 +13:00
Dylan McKay c5dac9d7c0 Move the serial module into a 'legacy' module 2018-11-05 23:32:39 +13:00
Dylan McKay ea1aef9b1a Remove as much atmega328p-hardcoded stuff as possible 2018-11-05 23:32:39 +13:00
Dylan McKay cb6e0d3b69 Invert the direction of the Register<T> type parameter 2018-11-05 23:32:39 +13:00
Dylan McKay 0157a8553c Implement the Timer16 trait 2018-11-05 23:32:39 +13:00
Dylan McKay d125f69f7d Get 16-bit timers working 2018-11-05 23:32:39 +13:00
Dylan McKay 274d4611ec More work done 2018-11-05 23:32:39 +13:00
Dylan McKay 1f638dbea3 Add a timer trait 2018-11-05 23:32:29 +13:00
Dylan McKay 468289e05f Support raw things 2018-11-05 23:32:29 +13:00
Dylan McKay 906b548dfa Do more work 2018-11-05 23:32:29 +13:00
Dylan McKay 5d65ad4efd Add a few stubs required from std into the library 2018-11-05 23:32:29 +13:00
Dylan McKay 72b0169d53 Rename RegVal to Register 2018-11-05 23:32:02 +13:00
Dylan McKay a19ef84d8d Fix typo 2018-11-05 23:32:02 +13:00
Dylan McKay f1756787db Make a module public 2018-11-05 23:32:02 +13:00
Dylan McKay fcca0f8c27 Place ports into their own module 2018-11-05 23:32:02 +13:00
Dylan McKay 61b32145df Improve the names of the Spi trait consts 2018-11-05 23:32:02 +13:00
Dylan McKay 394e07e160 Hardware usart support 2018-11-05 23:32:02 +13:00