MT7687 API Reference  LinkIt SDK v4
hal_irtx.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __HAL_IRTX_H__
36 #define __HAL_IRTX_H__
37 
38 #include "hal_platform.h"
39 
40 #ifdef HAL_IRTX_MODULE_ENABLED
41 
168 #ifdef __cplusplus
169 extern "C" {
170 #endif
171 
172 
178 #define HAL_IRTX_MAX_DATA_LENGTH (12)
191 typedef enum {
195 
196 
198 typedef enum {
202 
203 
205 typedef enum {
209 
210 
212 typedef enum {
216 
217 
237 typedef void (*hal_irtx_pulse_data_callback_t)(hal_irtx_event_t event, void *user_data);
238 
254 
255 
267 
268 
269 
283  const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH],
284  uint32_t bit_length);
285 
286 
287 
301  const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH],
302  uint32_t bit_length);
303 
304 
318  const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH],
319  uint32_t bit_length);
320 
321 
322 
335  uint32_t duty_cycle);
336 
337 
350  void *user_data);
351 
364 hal_irtx_status_t hal_irtx_send_pulse_data(uint32_t base_period, uint8_t *data, uint32_t length);
365 
366 
380 
381 
382 
383 #ifdef __cplusplus
384 }
385 #endif
386 
392 #endif /*HAL_IRTX_MODULE_ENABLED*/
393 #endif /* __HAL_IRTX_H__ */
394 
IRTX status error.
Definition: hal_irtx.h:199
IRTX repeat mode enable.
Definition: hal_irtx.h:192
IRTX status ok.
Definition: hal_irtx.h:200
hal_irtx_event_t
The IRRX transaction error.
Definition: hal_irtx.h:205
hal_irtx_status_t hal_irtx_init(void)
This function initializes the IRTX hardware clock.
IRTX busy.
Definition: hal_irtx.h:214
hal_irtx_status_t hal_irtx_send_rc6_data(hal_irtx_repeat_code_t repeat_code, const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH], uint32_t bit_length)
This function sends the data in the RC6 encoding format.
hal_irtx_repeat_code_t
The IRTX repeat mode.
Definition: hal_irtx.h:191
hal_irtx_status_t hal_irtx_send_nec_data(hal_irtx_repeat_code_t repeat_code, const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH], uint32_t bit_length)
This function sends the data in the NEC encoding format.
hal_irtx_status_t hal_irtx_register_pulse_data_callback(hal_irtx_pulse_data_callback_t callback, void *user_data)
This function registers the PWD encoding format data callback.
hal_irtx_status_t
The IRRX status.
Definition: hal_irtx.h:198
hal_irtx_status_t hal_irtx_configure_pulse_data_carrier(uint32_t frequency, uint32_t duty_cycle)
This function configures the pulse data carrier.
#define HAL_IRTX_MAX_DATA_LENGTH
irtx max data length
Definition: hal_irtx.h:178
void(* hal_irtx_pulse_data_callback_t)(hal_irtx_event_t event, void *user_data)
This defines the callback function prototype.
Definition: hal_irtx.h:237
hal_irtx_status_t hal_irtx_get_running_status(hal_irtx_running_status_t *running_status)
This function gets the current state of the IRTX.
IRTX transaction error.
Definition: hal_irtx.h:206
hal_irtx_status_t hal_irtx_send_pulse_data(uint32_t base_period, uint8_t *data, uint32_t length)
This function sends the data in the PWD encoded format.
IRTX idle.
Definition: hal_irtx.h:213
hal_irtx_status_t hal_irtx_deinit(void)
This function deinitializes the IRTX hardware clock.
IRTX transaction success.
Definition: hal_irtx.h:207
hal_irtx_running_status_t
The IRRX running status.
Definition: hal_irtx.h:212
IRTX repeat mode disable.
Definition: hal_irtx.h:193
hal_irtx_status_t hal_irtx_send_rc5_data(hal_irtx_repeat_code_t repeat_code, const uint8_t data[HAL_IRTX_MAX_DATA_LENGTH], uint32_t bit_length)
This function sends the data in the RC5 encoding format.