diff --git a/butano/hw/include/bn_hw_gpio.h b/butano/hw/include/bn_hw_gpio.h index cb61480d5..a70277cf9 100644 --- a/butano/hw/include/bn_hw_gpio.h +++ b/butano/hw/include/bn_hw_gpio.h @@ -22,6 +22,8 @@ namespace } } +[[nodiscard]] const char* init(); + [[nodiscard]] inline bool init_rtc() { return __agbabi_rtc_init() == 0; diff --git a/butano/hw/src/bn_hw_gpio.bn_noflto.cpp b/butano/hw/src/bn_hw_gpio.bn_noflto.cpp new file mode 100644 index 000000000..04326a91d --- /dev/null +++ b/butano/hw/src/bn_hw_gpio.bn_noflto.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020-2024 Gustavo Valiente gustavo.valiente@protonmail.com + * zlib License, see LICENSE file. + */ + +#include "../include/bn_hw_gpio.h" + +namespace bn::hw::gpio +{ + +namespace +{ + alignas(int) const char rtc_string[] = "SIIRTC_V001"; +} + +const char* init() +{ + return rtc_string; +} + +} diff --git a/butano/include/documentation/bn_documentation_g_changelog.h b/butano/include/documentation/bn_documentation_g_changelog.h index a45145b9e..a881a2ba9 100644 --- a/butano/include/documentation/bn_documentation_g_changelog.h +++ b/butano/include/documentation/bn_documentation_g_changelog.h @@ -29,6 +29,7 @@ * bn::sprite_affine_mat_ptr::set_rotation_angle_safe, bn::sprite_builder::set_rotation_angle_safe * and bn::sprite_ptr::set_rotation_angle_safe added. * * Position in `create` methods is now optional. + * * Real time clock (RTC) string added. * * SRAM string with link-time optimization fixed. * * @ref faq_bg_top_left and @ref faq_sprites_top_left questions added to the @ref faq page. * * @ref faq_flash_carts_sram question improved. diff --git a/butano/src/bn_core.cpp b/butano/src/bn_core.cpp index a550a6301..f7ea55ca5 100644 --- a/butano/src/bn_core.cpp +++ b/butano/src/bn_core.cpp @@ -30,6 +30,7 @@ #include "bn_hblank_effects_manager.h" #include "../hw/include/bn_hw_irq.h" #include "../hw/include/bn_hw_core.h" +#include "../hw/include/bn_hw_gpio.h" #include "../hw/include/bn_hw_sram.h" #include "../hw/include/bn_hw_timer.h" #include "../hw/include/bn_hw_memory.h" @@ -355,7 +356,10 @@ void init(const optional& transparent_color, const string_view& keypad_co data.slow_game_pak = hw::game_pak::init(); hw::memory::init(); - [[maybe_unused]] const char* sram_type = hw::sram::init(); + [[maybe_unused]] const char* sram_string = hw::sram::init(); + + // Init gpio: + [[maybe_unused]] const char* rtc_string = hw::gpio::init(); // Init display: display_manager::init(); diff --git a/docs/changelog.html b/docs/changelog.html index c91815b40..bd22c1c51 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -212,7 +212,7 @@

Contents

  • 0.1.0
  • -

    18.2.0 (next release)

    18.1.0

    18.0.1

    Tools no longer crash on Windows with more than 60 logical CPU cores.

    18.0.0

    17.9.0

    17.8.1

    17.8.0

    17.7.0

    17.6.0

    17.5.0

    17.4.0

    17.3.0

    17.2.0

    17.1.1

    bn::unique_ptr move fixed.

    17.1.0

    17.0.0

    16.6.0

    16.5.0

    16.4.0

    16.3.0

    16.2.0

    16.1.0

    16.0.0

    15.9.0

    15.8.2

    15.8.1

    bn::vector::assign fixed.

    15.8.0

    15.7.1

    Python 2 support restored.

    15.7.0

    15.6.0

    15.5.0

    15.4.1

    bn::core::reset race condition fixed.

    15.4.0

    15.3.2

    BG blocks commit fixed.

    15.3.1

    Slow game pak detection fixed (again).

    15.3.0

    15.2.0

    15.1.0

    15.0.0

    14.1.0

    14.0.0

    13.18.0

    13.17.0

    13.16.1

    bn::ibitset AND operator fixed.

    13.16.0

    13.15.0

    13.14.0

    13.13.0

    13.12.1

    Tonclib linking error fixed.

    13.12.0

    13.11.0

    13.10.1

    memset undefined references with link-time optimization fixed.

    13.10.0

    13.9.0

    13.8.1

    bn::any management with types that can't be copied, moved or swapped fixed.

    13.8.0

    13.7.0

    13.6.0

    13.5.0

    13.4.0

    13.3.1

    bn::erase and bn::erase_if fixed.

    13.3.0

    13.2.0

    13.1.1

    Recovery of deleted background maps fixed.

    13.1.0

    13.0.0

    12.5.0

    BN_CFG_ASSERT_SHOW_DIAGNOSTIC added.

    12.4.0

    12.3.0

    12.2.0

    12.1.0

    12.0.0

    11.0.1

    bn::string::starts_with and bn::string_view::starts_with fixed.

    11.0.0

    Huffman images compression support (make sure to update devkitARM before using it).

    10.7.0

    10.6.1

    bn::bitset AND, OR and XOR operators fixed.

    10.6.0

    10.5.0

    10.4.0

    10.3.0

    10.2.0

    10.1.0

    10.0.0

    9.5.0

    9.4.1

    BMP files colors count calculation fixed (again).

    9.4.0

    9.3.0

    9.2.0

    9.1.1

    bn::calculate_sin_lut_value sine and cosine symmetry with 135 and 315 degrees fixed.

    9.1.0

    9.0.0

    8.10.0

    8.9.0

    8.8.0

    8.7.0

    8.6.0

    8.5.0

    8.4.0

    8.3.0

    8.2.0

    8.1.0

    8.0.0

    7.8.0

    7.7.0

    7.6.0

    7.5.1

    Audio and HDMA issues when updating at less than 60FPS fixed.

    7.5.0

    7.4.0

    7.3.0

    7.2.0

    7.1.1

    bn::vector, bn::unordered_map and bn::unordered_set move constructors and assignment operators fixed.

    7.1.0

    7.0.1

    bn::format build fix.

    7.0.0

    6.18.0

    6.17.1

    6.17.0

    6.16.0

    6.15.0

    6.14.0

    6.13.1

    6.13.0

    6.12.0

    6.11.0

    6.10.0

    6.9.0

    6.8.0

    6.7.0

    6.6.2

    Automatic sprite double size detection fixed.

    6.6.1

    BG blocks manager use after move fixed.

    6.6.0

    6.5.0

    6.4.0

    6.3.0

    6.2.0

    6.1.0

    6.0.0

    5.3.1

    bn::atan2 and bn::degrees_atan2 fixed.

    5.3.0

    5.2.0

    5.1.0

    5.0.0

    4.4.0

    4.3.0

    4.2.0

    4.1.0

    4.0.0

    3.3.0

    3.2.1

    bn::optional build fix.

    3.2.0

    bn::optional is now constexpr.

    3.1.0

    3.0.0

    Thanks to the awesome gba-link-connection, multiplayer support has been implemented! See bn::link and the link example for more.

    2.0.0

    1.0.0

    0.4.0

    0.3.0

    0.2.0

    0.1.0

    First release.

    +

    18.2.0 (next release)

    18.1.0

    18.0.1

    Tools no longer crash on Windows with more than 60 logical CPU cores.

    18.0.0

    17.9.0

    17.8.1

    17.8.0

    17.7.0

    17.6.0

    17.5.0

    17.4.0

    17.3.0

    17.2.0

    17.1.1

    bn::unique_ptr move fixed.

    17.1.0

    17.0.0

    16.6.0

    16.5.0

    16.4.0

    16.3.0

    16.2.0

    16.1.0

    16.0.0

    15.9.0

    15.8.2

    15.8.1

    bn::vector::assign fixed.

    15.8.0

    15.7.1

    Python 2 support restored.

    15.7.0

    15.6.0

    15.5.0

    15.4.1

    bn::core::reset race condition fixed.

    15.4.0

    15.3.2

    BG blocks commit fixed.

    15.3.1

    Slow game pak detection fixed (again).

    15.3.0

    15.2.0

    15.1.0

    15.0.0

    14.1.0

    14.0.0

    13.18.0

    13.17.0

    13.16.1

    bn::ibitset AND operator fixed.

    13.16.0

    13.15.0

    13.14.0

    13.13.0

    13.12.1

    Tonclib linking error fixed.

    13.12.0

    13.11.0

    13.10.1

    memset undefined references with link-time optimization fixed.

    13.10.0

    13.9.0

    13.8.1

    bn::any management with types that can't be copied, moved or swapped fixed.

    13.8.0

    13.7.0

    13.6.0

    13.5.0

    13.4.0

    13.3.1

    bn::erase and bn::erase_if fixed.

    13.3.0

    13.2.0

    13.1.1

    Recovery of deleted background maps fixed.

    13.1.0

    13.0.0

    12.5.0

    BN_CFG_ASSERT_SHOW_DIAGNOSTIC added.

    12.4.0

    12.3.0

    12.2.0

    12.1.0

    12.0.0

    11.0.1

    bn::string::starts_with and bn::string_view::starts_with fixed.

    11.0.0

    Huffman images compression support (make sure to update devkitARM before using it).

    10.7.0

    10.6.1

    bn::bitset AND, OR and XOR operators fixed.

    10.6.0

    10.5.0

    10.4.0

    10.3.0

    10.2.0

    10.1.0

    10.0.0

    9.5.0

    9.4.1

    BMP files colors count calculation fixed (again).

    9.4.0

    9.3.0

    9.2.0

    9.1.1

    bn::calculate_sin_lut_value sine and cosine symmetry with 135 and 315 degrees fixed.

    9.1.0

    9.0.0

    8.10.0

    8.9.0

    8.8.0

    8.7.0

    8.6.0

    8.5.0

    8.4.0

    8.3.0

    8.2.0

    8.1.0

    8.0.0

    7.8.0

    7.7.0

    7.6.0

    7.5.1

    Audio and HDMA issues when updating at less than 60FPS fixed.

    7.5.0

    7.4.0

    7.3.0

    7.2.0

    7.1.1

    bn::vector, bn::unordered_map and bn::unordered_set move constructors and assignment operators fixed.

    7.1.0

    7.0.1

    bn::format build fix.

    7.0.0

    6.18.0

    6.17.1

    6.17.0

    6.16.0

    6.15.0

    6.14.0

    6.13.1

    6.13.0

    6.12.0

    6.11.0

    6.10.0

    6.9.0

    6.8.0

    6.7.0

    6.6.2

    Automatic sprite double size detection fixed.

    6.6.1

    BG blocks manager use after move fixed.

    6.6.0

    6.5.0

    6.4.0

    6.3.0

    6.2.0

    6.1.0

    6.0.0

    5.3.1

    bn::atan2 and bn::degrees_atan2 fixed.

    5.3.0

    5.2.0

    5.1.0

    5.0.0

    4.4.0

    4.3.0

    4.2.0

    4.1.0

    4.0.0

    3.3.0

    3.2.1

    bn::optional build fix.

    3.2.0

    bn::optional is now constexpr.

    3.1.0

    3.0.0

    Thanks to the awesome gba-link-connection, multiplayer support has been implemented! See bn::link and the link example for more.

    2.0.0

    1.0.0

    0.4.0

    0.3.0

    0.2.0

    0.1.0

    First release.