1 // SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 
5 //! Utility functions used throughout MCUboot
6 
align_up(num: u32, align: u32) -> u327 pub fn align_up(num: u32, align: u32) -> u32 {
8     assert!(align.is_power_of_two());
9 
10     (num + (align - 1)) & !(align - 1)
11 }
12