mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-26 20:53:11 +00:00
feat(driver): added RMT mock
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# The following lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(COMPONENTS main)
|
||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/driver/")
|
||||
project(rmt_mock_build_test)
|
||||
@@ -0,0 +1,2 @@
|
||||
| Supported Targets | Linux |
|
||||
| ----------------- | ----- |
|
||||
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
PRIV_REQUIRES "driver")
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "Mockrmt_encoder.h"
|
||||
#include "Mockrmt_common.h"
|
||||
#include "Mockrmt_tx.h"
|
||||
#include "Mockrmt_rx.h"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
rmt_channel_handle_t channel = 0;
|
||||
|
||||
/*Test that mock functions exist*/
|
||||
rmt_new_bytes_encoder(NULL, NULL);
|
||||
rmt_new_rx_channel(NULL, NULL);
|
||||
rmt_del_channel(channel);
|
||||
rmt_new_tx_channel(NULL, NULL);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_IDF_TARGET="linux"
|
||||
Reference in New Issue
Block a user