28 # error This is a userspace-only header, not allowed by the current build.
31 #include <sifteo/abi.h>
32 #include <sifteo/macros.h>
141 _SYS_paintUnlimited();
180 return _SYS_lti_isDebug();
195 SCRIPT_FMT(LUA,
"Runtime():poke(%p, 1)", &flag);
213 return _SYS_sysBatteryLevel() / float(_SYS_BATTERY_MAX);
230 return _SYS_shutdown(now ? 0 : _SYS_SHUTDOWN_WITH_UI);
266 _SYS_setCubeRange(minimum, maximum);
273 _SYS_setCubeRange(count, count);
289 if ((_SYS_getFeatures() & _SYS_FEATURE_SYS_VERSION) != 0) {
290 return _SYS_version() & _SYS_OS_VERSION_MASK;
293 return _SYS_OS_VERSION_NONE;
307 if ((_SYS_getFeatures() & _SYS_FEATURE_SYS_VERSION) != 0) {
308 return _SYS_version() >> _SYS_HW_VERSION_SHIFT;
311 return _SYS_HW_VERSION_NONE;
The original Sifteo Base.
Definition: system.h:57
static uint8_t hardwareVersion()
Returns the hardware revision for the Sifteo base this application is running on. ...
Definition: system.h:305
#define SCRIPT_FMT(_type,...)
Like SCRIPT(), but this variant supports format specifiers.
Definition: macros.h:303
static void exit()
Leave the game immediately.
Definition: system.h:68
static void yield()
Temporarily give up control of the CPU.
Definition: system.h:97
static uint32_t osVersion()
Returns the system's operating system version.
Definition: system.h:287
static void keepAwake()
Prevent the system from shutting down due to inactivity.
Definition: system.h:241
Default response for firmware versions that do not support retrieving the HW version.
Definition: system.h:56
HardwareVersion
Definition: system.h:55
static void finish()
Wait for any previous paint() to finish.
Definition: system.h:170
static float batteryLevel()
Get the system's battery level.
Definition: system.h:212
static void paintUnlimited()
Draw the next frame, without an upper limit on frame rate.
Definition: system.h:140
static void setCubeRange(unsigned minimum, unsigned maximum)
Set the range of cubes supported.
Definition: system.h:265
static void shutdown(bool now=false)
Shut down the system.
Definition: system.h:229
static void abort()
Exit with a fault, for fatal error handling.
Definition: system.h:78
The Sifteo Base with Bluetooth capabilities.
Definition: system.h:58
Global operations that apply to the system as a whole.
Definition: system.h:48
static bool isDebug()
Is this a debug build?
Definition: system.h:179
static void paint()
Draw the next frame.
Definition: system.h:119
static bool isSimDebug()
Is this a debug build running in simulation?
Definition: system.h:192
static void setCubeRange(unsigned count)
Helper to specify a cube range with identical minimum and maximum counts.
Definition: system.h:272