update ch4 with more comments

This commit is contained in:
Yu Chen 2022-03-26 21:34:42 +08:00
parent 76056c8626
commit 5946903948
24 changed files with 205 additions and 20 deletions

View file

@ -1,3 +1,6 @@
//! Loading user applications into memory
/// Get the total number of applications.
pub fn get_num_app() -> usize {
extern "C" {
fn _num_app();
@ -5,6 +8,7 @@ pub fn get_num_app() -> usize {
unsafe { (_num_app as usize as *const usize).read_volatile() }
}
/// get applications data
pub fn get_app_data(app_id: usize) -> &'static [u8] {
extern "C" {
fn _num_app();