File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ dual licensed as above, without any additional terms or conditions.
4747* Add ` bus_interrupt_status `
4848* Remove ` delay `
4949* Add back in the ` block_XXX ` API for reading/writing Block Devices.
50+ * Add idle function.
51+ * ` memory_get_region ` returns ` Option ` , not ` Result `
5052
5153### v0.6.1
5254
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ pub struct Api {
301301 /// (if any), or from the top of Region 0 (although this reduces the maximum
302302 /// application space available). The OS will prefer lower numbered regions
303303 /// (other than Region 0), so faster memory should be listed first.
304- pub memory_get_region : extern "C" fn ( region_index : u8 ) -> crate :: Result < types:: MemoryRegion > ,
304+ pub memory_get_region : extern "C" fn ( region_index : u8 ) -> crate :: Option < types:: MemoryRegion > ,
305305
306306 // ========================================================================
307307 // Human Interface Device Support
@@ -579,6 +579,15 @@ pub struct Api {
579579 num_blocks : u8 ,
580580 data : ApiByteSlice ,
581581 ) -> crate :: Result < ( ) > ,
582+
583+ // ========================================================================
584+ // Power management functions
585+ // ========================================================================
586+ /// The OS will call this function when it's idle.
587+ ///
588+ /// On a microcontroller, this will wait for interrupts. Running in an
589+ /// emulator, this will sleep the thread for a while.
590+ pub power_idle : extern "C" fn ( ) ,
582591}
583592
584593// ============================================================================
You can’t perform that action at this time.
0 commit comments