This commit is contained in:
jusax23 2023-09-10 00:11:42 +02:00
parent ef391b9720
commit 3365b9eed7
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41
5 changed files with 12 additions and 7 deletions

View file

@ -6,4 +6,4 @@ sentence=Arduino library for pico and esp32.
paragraph=Add compatible Features.
category=
url=https://jusax.de/git/jusax23/JuSDK
architectures=esp32,pico
architectures=esp32,rp2040

7
src/JuSDK.h Normal file
View file

@ -0,0 +1,7 @@
#ifndef _JU_SDK_H
#define _JU_SDK_H
#include "jmutex.h"
#include "jqueue.h"
#endif

View file

@ -1,5 +1,5 @@
#ifdef defined(_POSIX_THREADS)
#if defined(_POSIX_THREADS)
#include "esp32_queue.h"
#include "Arduino.h"

View file

@ -7,6 +7,8 @@
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Modified to run on an esp32.
*/
#include "../jmutex.h"

View file

@ -4,15 +4,11 @@
#if defined(ARDUINO_ARCH_RP2040)
#include "pico/mutex.h"
void test(){
}
#elif defined(ARDUINO_ARCH_ESP32)
#include "pthread.h"
typedef pthread_mutex_t mutex_t
#define mutex_t pthread_mutex_t
inline void mutex_init(mutex_t *mtx) { pthread_mutex_init(mtx, NULL); }
inline void mutex_enter_blocking(mutex_t *mtx) { pthread_mutex_lock(mtx); }