[−][src]Crate mynewt
Mynewt API for Rust. Contains Rust bindings for Mynewt API for C, generated by bindgen
.
Also includes safe versions of Mynewt APIs created specially for Rust.
Modules
encoding | Mynewt Encoding API for Rust |
hal | |
hw | Mynewt Hardware API for Rust |
kernel | Mynewt Kernel API for Rust |
libs | Mynewt Custom API for Rust |
result | Return type and error codes for Mynewt API |
spi | Experimental Non-Blocking SPI Transfer API. Uses a background task to send SPI requests sequentially. Request data is copied into Mbuf Queues before transmitting. |
sys | Mynewt System API for Rust |
util | Mynewt Utility Macros for Rust |
Macros
coap | Macro to compose a CoAP payload with JSON or CBOR encoding.
First parameter is |
coap_array | Compose an array under |
coap_item | Append an array item under the current object item. Add |
coap_item_int | Append a (key + int value + geo) item to the array named |
coap_item_int_val | Encode Integer Sensor Value: Create a new Item object in the parent array and set the Sensor Value's key/value (integer).
|
coap_item_str | Append a ( |
coap_root | Compose the payload root. |
coap_set_int_val | Given an object parent and an integer Sensor Value |
d | Macro to dump all tokens received as a literal string, e.g.
|
fill_zero | Return a const struct that has all fields set to 0. Used for initialising static mutable structs like |
json_rep_close_array | End the child array and resume writing the parent object. |
json_rep_object_array_end_item | End an array item, assumed to be an object. |
json_rep_object_array_start_item | Assume we have called |
json_rep_set_array | Assume we are writing an object now. Write the key name and start a child array. |
json_rep_set_int | Encode an int value into the current JSON encoding value |
json_rep_set_text_string | Encode a text value into the current JSON encoding value |
nx | Macro to display the token being parsed and the remaining tokens |
oc_rep_close_array | End the child array and resume writing the parent object. |
oc_rep_end_array | |
oc_rep_end_object | |
oc_rep_end_root_object | |
oc_rep_object_array_end_item | End an array item, assumed to be an object. |
oc_rep_object_array_start_item | Assume we have called |
oc_rep_set_array | Assume we are writing an object now. Write the key name and start a child array. |
oc_rep_set_int | Encode an int value |
oc_rep_set_text_string | Encode a text value |
oc_rep_start_array | |
oc_rep_start_object | |
oc_rep_start_root_object | |
parse | Parse the JSON code in the parameter and compose the CoAP payload. This macro takes these parameters: |
parse_vector | TODO: Parse the vector e.g. array items |
stringify_null | Macro that takes an identifier and returns a |
unexpected_token | Show an unexpected token error |
Structs
Delay | Rust Embedded HAL interface for Mynewt Delay |
GPIO | Rust Embedded HAL interface for Mynewt GPIO |
SPI | Rust Embedded HAL interface for Mynewt SPI |
Strn | Represents a null-terminated string, suitable for passing to Mynewt APIs as |
Enums
StrnRep | Either a byte string or a string pointer |
Constants
NULL | Declare a |
Functions
rust_sysinit⚠ | Initialise the Mynewt system. Start the Mynewt drivers and libraries. Equivalent to |
sysinit | Initialise the Mynewt system. Start the Mynewt drivers and libraries. Equivalent to |
Type Definitions
Out | Declare a pointer that will be used by C functions to return a value |
Ptr | Declare a |