c5cec3a6ba
* bump pxt * fix build issues * Auto-gen of projects/summary * removing feild editors moved to pxt * various typing fixes * more typing fixes * fixing various typing issues * Start on integration of new pxt * serial number fixes * gc-ify MMap object * Re-build generated files * fix console listeners * clear lf() warnings * More generated files * also auto-generated * Compilation fixes * fix merge * mostly fixing blocks * fix sim * fix field motors * enable a few features * moving to tsx * try to fix edtiro compilation * more defs * removing commands * removing extra $ * fix blockly warning * hiding images * enabling more pxt features * hide images * setup autorun * add lock on target_reset * update deps * return trylock result * updated pxt * rename video section * add alpha channel * upgraded pxt * bump pxt/version * removed alpha ref * var ceanup * don't do major bump
51 lines
781 B
C++
51 lines
781 B
C++
#ifndef __PXT_H
|
|
#define __PXT_H
|
|
|
|
#include "pxtbase.h"
|
|
|
|
void *xmalloc(size_t sz);
|
|
|
|
namespace pxt {
|
|
void raiseEvent(int id, int event);
|
|
int allocateNotifyEvent();
|
|
void sleep_core_us(uint64_t us);
|
|
void startUser();
|
|
void stopUser();
|
|
int tryLockUser();
|
|
|
|
class Button;
|
|
typedef Button *Button_;
|
|
|
|
extern "C" void target_init();
|
|
|
|
|
|
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 *);
|
|
};
|
|
|
|
extern volatile bool paniced;
|
|
void target_exit();
|
|
|
|
// Buffer, Sound, and Image share representation.
|
|
typedef Buffer Sound;
|
|
|
|
}
|
|
|
|
#define DEVICE_EVT_ANY 0
|
|
#define DEVICE_ID_NOTIFY 10000
|
|
#define DEVICE_ID_NOTIFY_ONE 10001
|
|
|
|
#define IMAGE_BITS 1
|
|
|
|
#endif
|