Alex Mikhalev
6 years ago
4 changed files with 37 additions and 1 deletions
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
set(COMPONENT_SRCS |
||||
"mpu_driver.c") |
||||
set(COMPONENT_ADD_INCLUDEDIRS ".") |
||||
|
||||
register_component() |
||||
|
||||
component_compile_options("-Werror=incompatible-pointer-types") |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
#include "mpu_driver.h" |
||||
|
||||
typedef struct mpu_s { |
||||
} mpu_t; |
||||
|
||||
esp_err_t mpu_init(mpu_config_t *config, mpu_t **hndl_out) { |
||||
mpu_t *hndl = malloc(sizeof(mpu_t)); |
||||
if (!hndl) return ESP_ERR_NO_MEM; |
||||
*hndl_out = hndl; |
||||
|
||||
return ESP_OK; |
||||
} |
||||
|
||||
esp_err_t mpu_free(mpu_t *hndl) { |
||||
free(hndl); |
||||
|
||||
return ESP_OK; |
||||
} |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
#pragma once |
||||
|
||||
#include <esp_err.h> |
||||
|
||||
typedef struct mpu_config_s { |
||||
} mpu_config_t; |
||||
|
||||
typedef struct mpu_s *mpu_hndl_t; |
||||
|
||||
esp_err_t mpu_init(mpu_config_t *config, mpu_hndl_t *hndl_out); |
||||
esp_err_t mpu_free(mpu_hndl_t hndl); |
Loading…
Reference in new issue