Classes | Macros | Typedefs | Enumerations | Functions
rtus.h File Reference

Reference Time Update Service API. More...

`#include "gr55xx_sys.h"`
`#include "custom_config.h"`
`#include <stdint.h>`
`#include <stdbool.h>`

Go to the source code of this file.

## Classes
struct | rtus_update_state_t
| RTUS Time Update State. More...
struct | rtus_evt_t
| RTUS Event data. More...
struct | rtus_init_t
| Reference Time Update Service init structure. More...

## Macros
#define | RTUS_CONNECTION_MAX
| Maximum number of RTUS connections. More...
#define | RTUS_CTRL_PT_VAL_LEN 1
| Length of Time Update Control Point value. More...
#define | RTUS_UPDATE_STATE_VAL_LEN 2
| Length of Time Update State value. More...
#define | RTUS_CHAR_FULL 0x1f
| Bit mask for mandatory characteristic in RTUS. More...

## Typedefs
typedef void(* | rtus_evt_handler_t) (rtus_evt_t *p_evt)
| Reference Time Update Service event handler type. More...

## Enumerations
enum | rtus_ctrl_pt_t { RTUS_CTRL_PT_GET_UPDATE = 0x01, RTUS_CTRL_PT_CANCEL_UPDATE }
| RTUS Time Update Control Point. More...
enum | rtus_cur_state_t { RTUS_CUR_STATE_IDLE, RTUS_CUR_STATE_PENDING }
| RTUS Current State. More...
enum | rtus_update_result_t { RTUS_UPDATE_RESULT_SCCESSFUL, RTUS_UPDATE_RESULT_CANCELED, RTUS_UPDATE_RESULT_NO_CONN_TO_REF, RTUS_UPDATE_RESULT_REP_ERROR, RTUS_UPDATE_RESULT_TIMEOUT, RTUS_UPDATE_RESULT_NO_ATTEMPTED }
| RTUS Time Update Result. More...
enum | rtus_evt_type_t { RTUS_EVT_INVALID, RTUS_EVT_GET_UPDATE, RTUS_EVT_CANCEL_UPDATE }
| RTUS Event type. More...

## Functions
sdk_err_t | rtus_service_init (rtus_init_t *p_rtus_init)
| Initialize a RTUS instance and add in the DB. More...
void | rtus_current_state_set (rtus_cur_state_t cur_state)
| Set state of reference time update . More...
void | rtus_update_result_set (rtus_update_result_t update_result)
| Set result of reference time update . More...

## Detailed Description

Reference Time Update Service API.

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file rtus.h.