aboutsummaryrefslogtreecommitdiff
path: root/src/zjs_common.h
AgeCommit message (Collapse)Author
2018-05-18[debugger] Added debugger support for ZephyrJimmy Huang
Created shim layer for building against the POSIX network stack on Zephyr which enables the debugger to run on the frdm_k64f board with TCP IPV4 on port 5001. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2018-02-01[general] Style cleanup with clang (#1794)Jimmy Huang
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-12-15[aio] Add FTRACE support for debuggingGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-12-15[aio] Use board pin mechanism for AIO; remove old pins modulesGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-10-31[aio] Added FRDM-K64F supportJimmy Huang
Fixes #544 Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-10-31[aio] Make AIO a EventEmitter and remove .on()Jimmy Huang
Refactor AIO to use the EventEmitter function for onchange events, and change the way how readAsync is implemented so that it shares the same logic as the synchronous version. Also update tests to use to proper listener removal APIs. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-10-06[common] Do not include __FILE__ macro in non debug builds (#1570)Sudarsana Nagineni
Using __FILE__ macro in non debug code is increasing the image size depending on where the sources are built, so this patch removes that macro from the non debug code. Fixes #1550 Signed-off-by: Sudarsana Nagineni <sudarsana.nagineni@intel.com>
2017-10-06[timers] Make timers completely async/event driven (#1542)James Prestwood
Timers currently used the main event loop to check if the timer had expired. This change uses Zephyr's timer callbacks to signal the JS function. The linux port uses signals to do the same thing. Signed-off-by: James Prestwood <james.prestwood@intel.com>
2017-09-18[debug] Add VERBOSITY flag to control debug output verbosity (#1533)Geoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-09-11[callbacks] Split callback locks to protect ringbuf vs. cb_mapGeoff Gustafson
Way too much code was being locked in zjs_callbacks.c and it was causing deadlocks. It's still probably possible, this could be refined further - for example jerry_call_function is still getting called within a CB_LOCK. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-09-11[common] Make FTRACE a reusable feature in zjs_common.hGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-09-11[common] Add flag for enabling ZJS_ASSERT even in release modeGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-09-11[net] Add FTRACE feature for tracing function calls in zjs_net.cGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-09-08[utils] Add ZJS_ASSERT macro to test assertions in debug modeGeoff Gustafson
Does nothing in release mode, but in debug mode if an assertion fails it prints a message and hangs to make sure it's noticed. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-07-07[general] Clean up for formatting (#1314)Jimmy Huang
The patch does the following: - Sorting include headers - Wrap lines more than 80 characters - Make function declaration/definition consistent - Align args - Remove spaces and fix indentation - Add comments for includes - Fix pointer alignment Most of the styling is formatting using clang-format and then applying manual tweaks to fit our project style. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-06-29[sensor] Added Magnetometer sensor support (#1309)Jimmy Huang
It will support the fxos8700 magnetometer sensor on the FRDM_K64F Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-06-29[build] Fix linux and QEMU build on Mac (#1307)Jimmy Huang
Disable ocf build and fixed linux build on MacOS. Fixes #1290 Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-06-20[general] Use Zephyr defined typesJimmy Huang
Rebase ZJS to move away from the C99 {u}int{8,16,32,64}_t types to Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-06-20[sensor] k64f support (#1208)Jimmy Huang
Refactor sensor and decouple IPM logic into a separate sensor_board module. Added initial support for Accelerometer for the FRDM-K64F board. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-05-19[common] Change error label in ERR_PRINT because IDE drops those linesGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2017-05-11[pme] Initial implementation of CuriePME API (#1082)Jimmy Huang
Added CuriePME driver from the 01.org/Intel-Pattern-Matching-Technology project, and added Javascript bindings for the core APIs. Also created a sample the tests the basic functionality. Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2017-03-28[sensor] Fixed bug where controller name can't get set (#912)Jimmy Huang
Change controller from a char* to array so that it can be overwritten, akso make default controller for AmbientLight to be "ADC_0" and fix a leak Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2016-12-22[general] Shorten file paths and improve dbg/err output format (#569)Geoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-11-14[general] Print ERR_PRINT messages in release builds (#429)Geoff Gustafson
We don't want to miss errors when we're in release builds. Things for debug only belong in DBG_PRINT. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-11-10[ocf] OCF implementation using iotivity-constrained (#288)James Prestwood
Also, replaced PRINT with ZJS_PRINT to resolve naming conflict. Signed-off-by: James Prestwood <james.prestwood@intel.com>
2016-10-18[debugging] Print elapsed time since start with DBG_PRINT/ERR_PRINT (#275)James Prestwood
Signed-off-by: James Prestwood <james.prestwood@intel.com>
2016-10-05[Demo] Cleaned up debug messages for the BLE demo (#248)Jimmy Huang
Moved the DBG_PRINT macro to zjs_common.h for ARC to use as well, move all unneeded print messages for the demo to debug, and added a newline to indicate the beginning of the app Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2016-10-03[General] Modify DBG_PRINT to not require double parenthesesGeoff Gustafson
Also, it appears we never require PRINT to be defined as printk in our code, so remove that ifdef for now.
2016-09-22[Script] Increase maximum JavaScript sizeJimmy Huang
Increase this from 4k to 8k so that the heart rate demo will fit Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
2016-09-07[General] Restore MAX_SCRIPT_SIZE limit and add error checking for itGeoff Gustafson
Checks for runtime and compile-time oversize scripts depending on which method is used. Also, fix const issue on script variable in main(). Also, enable all warnings and make warnings errors in src/Makefile.base Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-08-15[Linux] Added option to build for linuxJames Prestwood
- In prep for OCF work, having a linux build will be much easier for development. With some minor porting changes/additions you can now build for linux: make linux JS=<script> - Support is minimal and not extensively tested. I have confirmed that HelloWorld.js and Timers.js work, though timers may not be accurate due to Zephyr using ticks and linux using real time. Signed-off-by: James Prestwood <james.prestwood@intel.com>
2016-07-14[A101] Add easy pin names for AIO pins on Arduino 101Geoff Gustafson
Now pin info is shared between X86 and ARC, and hopefully more able to be configured to target different hardware. Also, fixed but where A5 was assigned to pin 15, but really it's pin 9. This also means now the pin_values arrays hold A5 first (lowest pin 9) then A0-A4. Started making A101-specific code configured by build flags in anticipation of wider hardware support. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-07-14[General] Prevent multiple inclusion of header filesGeoff Gustafson
Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
2016-07-12[util] Remove ARC code's dependency on JerryScript headersGeoff Gustafson
This was by slightly reorganizing header files, because the ARC code doesn't actually use anything from JerryScript so it shouldn't be dependent on it. Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>