IRPyro messaging application
Communications program between IRPyro and IRPyro evaluation tool
queue_handle.h
Go to the documentation of this file.
1 /**
2 ******************************************************************************
3 * @file queue_handle.h
4 * @author _KEMET, Ltd
5 * @date March 2018
6 * @version Release 1.0.6
7 * @copyright (c) 2018 _KEMET, Ltd
8 * @brief Manages message queues from the GUI to sensor and sensor to GUI
9 ******************************************************************************
10  @attention <h2><center>&copy; COPYRIGHT 2018 _KEMET, Ltd</center></h2>
11  @verbatim
12  Copyright (c) 2018, _KEMET, Ltd
13  All rights reserved.
14 
15  THIS SOFTWARE IS PROVIDED BY _KEMET, Ltd ''AS IS'' AND ANY
16  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL _KEMET, Ltd BE LIABLE FOR ANY
19  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  @endverbatim
26 ******************************************************************************
27 */
28 /* Includes ------------------------------------------------------------------*/
29 #ifndef UART_HANDLE_H_
30 #define UART_HANDLE_H_
31 //#include <stdint.h>
32 //#include "stm32f30x_usart.h"
33 //#include "stm32f30x_flash.h"
34 #include "Micro_controller_template.h"
35 #include "queue.h"
36 
37 #define USB_NODATA 0
38 #define USB_DATA 1
39 #define USB_ERR 2
40 #define USB_SENT 3
41 #define USB_TO 4 // time out
42 #define USB_BCOK 5
43 
44 #define USB_TIMEOUT 501 // means between 100 & 100.2 ms
45 #define USB_IN_BUFFER_SIZE 128
46 
47 #define ERR_OK 0
48 #define ERR_FAILED 1
49 #define ERR_TIMEOUT 2
50 
51 #define IRPyro_VERSION 0x02
52 #define IRPyro_CCP_WRITE 0x10
53 
54 #define IRPyro_DATA_SIZE 17
55 #define IRPyro_CCP_SIZE 5
56 #define IRPyro_AFE_SIZE 2
57 #define IRPyro_WUP_SIZE 6
58 #define IRPyro_ENG_SIZE 1
59 #define IRPyro_REV_SIZE 1
60 #define IRPyro_STS_SIZE 1
61 
62 void message_putchar(uint8_t c, uint8_t go_flag);
63 uint8_t message_getchar(uint8_t *c);
64 void queue_handle_enable(void);
65 #endif /* UART_HANDLE_H_ */
66 /************************ _KEMET 2018 *****END OF FILE****/
queue_handle_enable
void queue_handle_enable(void)
Definition: queue_handle.c:102
queue.h
Operates a circular queue.
message_putchar
void message_putchar(uint8_t c, uint8_t go_flag)
sends a character to the transmission queue and enables TX interrupt
Definition: queue_handle.c:125
message_getchar
uint8_t message_getchar(uint8_t *c)
Gets a character from the receive queue.
Definition: queue_handle.c:114