Subversion Repositories Code-Repo

Rev

Rev 212 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 212 Rev 231
Line 1... Line -...
1
#include <xc.h>
-
 
2
#include <plib.h>
-
 
3
#include "defines.h"
1
#include "defines.h"
4
#include "BTN.h"
2
#include "BTN.h"
5
 
3
 
6
static BTN_DATA *btn_data_ptr;
4
static BTN_DATA *btn_data_ptr;
7
 
5
 
Line 22... Line 20...
22
#if defined CEREBOT_32MX7
20
#if defined CEREBOT_32MX7
23
    CNENSET = 0x80300;  // Set interrupt on CN8/9/19
21
    CNENSET = 0x80300;  // Set interrupt on CN8/9/19
24
#elif defined CEREBOT_MX7CK
22
#elif defined CEREBOT_MX7CK
25
    CNENSET = 0x00300;  // Set interrupt on CN8/9
23
    CNENSET = 0x00300;  // Set interrupt on CN8/9
26
#endif
24
#endif
27
    int tmp = BTN1_PORT;
25
    int32_t tmp = BTN1_PORT;
28
    tmp = BTN2_PORT;
26
    tmp = BTN2_PORT;
29
    tmp = BTN3_PORT;
27
    tmp = BTN3_PORT;
30
    IPC6SET = 0xD0000;  // Set priority level = 3, sub-priority level = 1
28
    IPC6SET = 0xD0000;  // Set priority level = 3, sub-priority level = 1
31
    IFS1CLR = 0x1;      // Clear interrupt flag
29
    IFS1CLR = 0x1;      // Clear interrupt flag
32
    IEC1SET = 0x1;      // Enable interrupt
30
    IEC1SET = 0x1;      // Enable interrupt