Raspberry Pio Pico Drivers project
Loading...
Searching...
No Matches
rpp_driver::SdkWrapper Class Reference

Wrapper class for the RasPi Pico SDK functions. More...

#include <sdkwrapper.hpp>

Detailed Description

Wrapper class for the RasPi Pico SDK functions.

The member function declaration follow the SDK APIs. Also, the doxygen comments are copied from the RasPi Pico SDK source code.

This wrapper class is convenient for the dependency injection to allow the unit test.

The mock of this class is declared in the same file with this class.

Usage of mock

In the case of the testing of the user program which uses this class, a programmer can use the pre-defined mock class ::rpp_driver::MockSdkWrapper inside sdkwrapper.hpp.

#include <gmock/gmock.h>
#include <gtest/gtest.h>
class UserCodeTest : public ::testing::Test {
protected:
::rpp_driver::MockSdkWrapper mock_sdk_;
};
TEST_F(UserCodeTest, foo) {
// Write Test code here.
}
Wrapper for RasPi Pico SDK API.

The documentation for this class was generated from the following file: