jswrap_onewire.h 928 B

1234567891011121314151617181920212223
  1. /*
  2. * This file is part of Espruino, a JavaScript interpreter for Microcontrollers
  3. *
  4. * Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. *
  10. * ----------------------------------------------------------------------------
  11. * JavaScript OneWire Functions
  12. * ----------------------------------------------------------------------------
  13. */
  14. #include "jsvar.h"
  15. #include "jspin.h"
  16. JsVar *jswrap_onewire_constructor(Pin pin);
  17. bool jswrap_onewire_reset(JsVar *parent);
  18. void jswrap_onewire_select(JsVar *parent, JsVarInt rom);
  19. void jswrap_onewire_skip(JsVar *parent);
  20. void jswrap_onewire_write(JsVar *parent, int data, bool leavePowerOn);
  21. JsVarInt jswrap_onewire_read(JsVar *parent);
  22. JsVar *jswrap_onewire_search(JsVar *parent);