Skip to content

Commit

Permalink
Issue #25 : Add wider API support of RasPi Pico SDK
Browse files Browse the repository at this point in the history
hardware_rtc.
  • Loading branch information
suikan4github committed Nov 29, 2024
1 parent 34bda26 commit 266effd
Show file tree
Hide file tree
Showing 10 changed files with 7,750 additions and 7,508 deletions.
452 changes: 230 additions & 222 deletions src/sdk/mocksdkwrapper.hpp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/sdk/pico_api_alternate_defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ enum powman_power_domains { o, p };
/// @brief Alternate definition for Google Test build.
enum pwm_clkdiv_mode { q, r };

//// @brief Alternate definition for Google Test build.
typedef int rtc_callback_t;
//// @brief Alternate definition for Google Test build.
typedef int datetime_t;
//// @brief Alternate definition for Google Test build.
typedef int io_rw_32;
//// @brief Alternate definition for Google Test build.
Expand Down
9,715 changes: 4,933 additions & 4,782 deletions src/sdk/pico_sdk_apistub.cpp

Large diffs are not rendered by default.

63 changes: 33 additions & 30 deletions src/sdk/pico_sdk_headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,79 @@
*
* Not intended to be read from the application program.
*/
#if __has_include(<pico/time.h>) || __has_include(<gmock/gmock.h>)
#include <pico/time.h>
#endif // __has_include(<pico/time.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<pico/stdio.h>) || __has_include(<gmock/gmock.h>)
#include <pico/stdio.h>
#endif // __has_include(<pico/stdio.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/adc.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/adc.h>
#endif // __has_include(<hardware/adc.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/adc.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/clocks.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/clocks.h>
#endif // __has_include(<hardware/clocks.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/divider.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/divider.h>
#endif // __has_include(<hardware/divider.h>) ||
// __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/divider.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/dma.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/dma.h>
#endif // __has_include(<hardware/dma.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/dma.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/exception.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/exception.h>
#endif // __has_include(<hardware/exception.h>) ||
// __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/exception.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/flash.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/flash.h>
#endif // __has_include(<hardware/flash.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/flash.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/gpio.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/gpio.h>
#endif // __has_include(<hardware/gpio.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/i2c.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/i2c.h>
#endif // __has_include(<hardware/i2c.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/i2c.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/interp.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/interp.h>
#endif // __has_include(<hardware/interp.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/interp.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/irq.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/irq.h>
#endif // __has_include(<hardware/irq.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/irq.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/pll.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/pll.h>
#endif // __has_include(<hardware/pll.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/pll.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/pio.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/pio.h>
#endif // __has_include(<hardware/pio.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/pio.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/powman.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/powman.h>
#endif // __has_include(<hardware/powman.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/powman.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/pwm.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/pwm.h>
#endif // __has_include(<hardware/pwm.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/pwm.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/rcp.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/rcp.h>
#endif // __has_include(<hardware/rcp.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/rcp.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/resets.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/resets.h>
#endif // __has_include(<hardware/resets.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/gpio.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/gpio.h>
#endif // __has_include(<hardware/gpio.h>) || __has_include(<gmock/gmock.h>)
#endif // __has_include(<hardware/resets.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<hardware/clocks.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/clocks.h>
#endif // __has_include(<hardware/clocks.h>) || __has_include(<gmock/gmock.h>)
#if __has_include(<hardware/rtc.h>) || __has_include(<gmock/gmock.h>)
#include <hardware/rtc.h>
#endif // __has_include(<hardware/rtc.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<pico/time.h>) || __has_include(<gmock/gmock.h>)
#include <pico/time.h>
#endif // __has_include(<pico/time.h>) || __has_include(<gmock/gmock.h>)

#if __has_include(<pico/stdio.h>) || __has_include(<gmock/gmock.h>)
#include <pico/stdio.h>
#endif // __has_include(<pico/stdio.h>) || __has_include(<gmock/gmock.h>)
9 changes: 5 additions & 4 deletions src/sdk/scripts/api_dirs.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
pico time
pico stdio
hardware adc
hardware clocks
hardware divider
hardware dma
hardware exception
hardware flash
hardware gpio
hardware i2c
hardware interp
hardware irq
Expand All @@ -12,7 +16,4 @@ hardware powman
hardware pwm
hardware rcp
hardware resets
hardware gpio
hardware clocks
pico time
pico stdio
hardware rtc
4 changes: 4 additions & 0 deletions src/sdk/scripts/blocks/pico_api_alternate_defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ enum powman_power_domains { o, p };
/// @brief Alternate definition for Google Test build.
enum pwm_clkdiv_mode { q, r };

//// @brief Alternate definition for Google Test build.
typedef int rtc_callback_t;
//// @brief Alternate definition for Google Test build.
typedef int datetime_t;
//// @brief Alternate definition for Google Test build.
typedef int io_rw_32;
//// @brief Alternate definition for Google Test build.
Expand Down
Loading

0 comments on commit 266effd

Please sign in to comment.