65 lines
2.2 KiB
C
65 lines
2.2 KiB
C
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* #define PD_USE_BLUETOOTH */ /* messages to Pd over bluetooth */
|
|
#define PD_USE_WIFI /* messages to/from Pd over wifi TCP */
|
|
#define PD_USE_CONSOLE /* messages to Pd over "console" (USB serial) */
|
|
/* #define PD_INCLUDEPATCH */ /* load the patch defined in "testpatch.c" */
|
|
/* #define PD_LYRAT */ /* using LyraT or LyraT mini board */
|
|
#define USEADC /* enable audio input (output always enabled) */
|
|
#define PD_USE_GYRO /* complex Arts board with BNO085 gyro */
|
|
#define IOCHANS 2
|
|
#define OBSOLETEAPI /* need this for LyraT boards */
|
|
|
|
/* task priorities */
|
|
#define PRIORITY_WIFI 2
|
|
|
|
/* if WIFI is enabled we need to define the WIFI name and password,
|
|
the peer machine, and the send and receive ports. This can be done
|
|
using a "locale.h" or by defining CONFIG_ESP_WIFI_SSID, etc., in
|
|
some other way, such as in the sdkconfig file. */
|
|
#if defined(CONFIG_LOCALE_FILE)
|
|
#include CONFIG_LOCALE_FILE
|
|
#else
|
|
#if defined(PD_USE_WIFI) && !defined(CONFIG_ESP_WIFI_SSID)
|
|
#include "locale.h"
|
|
#endif
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
void pd_sendmsg(char *buf, int bufsize);
|
|
void pd_fromhost(char *data, size_t size);
|
|
|
|
#ifdef PD_USE_BLUETOOTH
|
|
void pd_bt_poll( void);
|
|
void bt_init( void);
|
|
void pd_bt_writeback(unsigned char *s, int length);
|
|
#endif
|
|
|
|
#ifdef PD_USE_WIFI
|
|
void wifi_init(void); /* wifi.c - manage 802.11 connection */
|
|
void net_init( void); /* init */
|
|
void net_hello( void); /* send initial TCP packet when connected */
|
|
void net_alive( void); /* send keep-alive packet if needed */
|
|
void net_sendudp(void *msg, int len, int port); /* send whatev */
|
|
void net_sendtcp(void *msg, int len);
|
|
extern char wifi_ipaddr[];
|
|
#endif
|
|
|
|
#ifndef PIN_BIT_CLOCK /* fallback pin locations for I2S audio I/O */
|
|
#define PIN_BIT_CLOCK 13 /* bit clock */
|
|
#define PIN_WORD_SELECT 33 /* word select */
|
|
#define PIN_DATA_OUT 32 /* data out from ESP32 to DAC */
|
|
#define PIN_DATA_IN 35 /* data in from ADC to ESP32 */
|
|
#endif /* PIN_BIT_CLOCK */
|
|
|
|
#ifdef PD_USE_GYRO
|
|
#include "gyro.h"
|
|
void pd_sendgyro(float roll, float pitch, float yaw);
|
|
#endif
|
|
|
|
#if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus)
|
|
}
|
|
#endif
|