-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlorawan_init.c
89 lines (79 loc) · 2.72 KB
/
lorawan_init.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/********************************************************************
* Copyright (C) 2016 Microchip Technology Inc. and its subsidiaries
* (Microchip). All rights reserved.
*
* You are permitted to use the software and its derivatives with Microchip
* products. See the license agreement accompanying this software, if any, for
* more info about your rights and obligations.
*
* SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
* MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR
* PURPOSE. IN NO EVENT SHALL MICROCHIP, SMSC, OR ITS LICENSORS BE LIABLE OR
* OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH
* OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY FOR ANY DIRECT OR INDIRECT
* DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR OTHER SIMILAR COSTS. To the fullest
* extend allowed by law, Microchip and its licensors liability will not exceed
* the amount of fees, if any, that you paid directly to Microchip to use this
* software.
*************************************************************************
*
* lorawan_init.c
*
* LoRaWAN Initialization file
*
******************************************************************************/
/****************************** INCLUDES **************************************/
#include <xc.h>
#include "mcc_generated_files/ext_int.h"
#include "mcc_generated_files/pin_manager.h"
#include "mcc_generated_files/interrupt_manager.h"
#include "mcc_generated_files/spi1.h"
#include "interrupt_manager_lora_addons.h"
#include "tmr_lora_addons.h"
#include "sw_timer.h"
#include "lorawan_defs.h"
#include "mcc_lora_config.h"
void DIO0_ISR_Lora_Init(void);
void DIO1_ISR_Lora_Init(void);
void DI02_ISR_Lora_Init(void);
void DIO4_ISR_Lora_Init(void);
void DIO5_ISR_Lora_Init(void);
void DIO0_ISR_Lora_Init(void)
{
INT0_SetInterruptHandler(DIO0_ISR_Lora);
}
void DIO1_ISR_Lora_Init(void)
{
INT1_SetInterruptHandler(DIO1_ISR_Lora);
}
void DIO2_ISR_Lora_Init(void)
{
// INT2_SetInterruptHandler(DIO2_ISR_Lora);
}
void DIO3_ISR_Lora_Init(void)
{
// IOCCF7_SetInterruptHandler(DIO3_ISR_Lora);
}
void DIO4_ISR_Lora_Init(void)
{
// IOCCF6_SetInterruptHandler(DIO5_ISR_Lora);
}
void DIO5_ISR_Lora_Init(void)
{
// IOCCF5_SetInterruptHandler(DIO5_ISR_Lora);
}
void LORAWAN_PlatformInit(void)
{
DIO0_ISR_Lora_Init();
DIO1_ISR_Lora_Init();
DIO2_ISR_Lora_Init();
DIO3_ISR_Lora_Init();
DIO4_ISR_Lora_Init();
DIO5_ISR_Lora_Init();
SPI_Open(SPI_DEFAULT);
}
/**
End of File
*/