pxt-ev3/libs/core/pxt.h

51 lines
781 B
C
Raw Normal View History

2017-06-29 16:47:26 +02:00
#ifndef __PXT_H
#define __PXT_H
#include "pxtbase.h"
void *xmalloc(size_t sz);
2017-07-05 02:17:26 +02:00
namespace pxt {
void raiseEvent(int id, int event);
2017-07-07 12:44:34 +02:00
int allocateNotifyEvent();
2017-07-05 02:17:26 +02:00
void sleep_core_us(uint64_t us);
void startUser();
void stopUser();
int tryLockUser();
2017-07-05 02:17:26 +02:00
class Button;
typedef Button *Button_;
2017-07-05 19:35:05 +02:00
extern "C" void target_init();
2017-07-07 19:26:49 +02:00
class MMap : public RefObject {
public:
int length;
int fd;
uint8_t *data;
MMap();
void destroy();
void print();
static void scan(MMap *);
static unsigned gcsize(MMap *);
2017-07-07 19:26:49 +02:00
};
extern volatile bool paniced;
void target_exit();
2017-07-07 19:26:49 +02:00
2017-10-30 18:25:58 +01:00
// Buffer, Sound, and Image share representation.
typedef Buffer Sound;
2017-07-05 02:17:26 +02:00
}
2017-07-07 12:44:34 +02:00
#define DEVICE_EVT_ANY 0
#define DEVICE_ID_NOTIFY 10000
#define DEVICE_ID_NOTIFY_ONE 10001
#define IMAGE_BITS 1
2017-06-29 16:47:26 +02:00
#endif