include/hcs12/interrupt.h
author etisserant
Mon, 02 Jul 2007 18:22:58 +0200
changeset 236 905677ed00f3
parent 0 4472ee7c6c3e
permissions -rw-r--r--
Full preliminary implementation of TPDO transmit type:
- SYNC (N) (1-240)
- RTR only + SYNC (252)
- RTR only (253)
- EVENT, with timer and inhibit time (254 and 255)

User app have to call sendPDOevent(d) to eventually signal mapped data changes.
Callbacks added to 0x140N, TPDO comm parameters for on the fly timers values change.
TestMasterSlave updated.
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     1
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     5
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     6
See COPYING file for copyrights details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     7
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    12
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    16
Lesser General Public License for more details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    17
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    21
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    22
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    23
#ifndef __INTERRUPT__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
#define __INTERRUPT__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
Disable interrupts
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    30
void lock (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
Enable interrupts
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    34
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    35
void unlock (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    36
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
Timer overflow
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    40
void __attribute__((interrupt)) timerOvflHdl (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    41
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    43
Message transmitted on MSCAN 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    45
void __attribute__((interrupt)) can0HdlTra (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
Message received on MSCAN 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    49
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
void __attribute__((interrupt)) can0HdlRcv (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    52
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    53
Message error on MSCAN 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    54
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
void __attribute__((interrupt)) can0HdlWup (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    57
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
Message error on MSCAN 0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    60
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
void __attribute__((interrupt)) can0HdlErr (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    62
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    63
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    64
Message transmited on MSCAN 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    65
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    66
void __attribute__((interrupt)) can1HdlTra (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    67
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    68
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    69
Message received on MSCAN 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    70
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    71
void __attribute__((interrupt)) can1HdlRcv (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    72
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    73
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    74
Message error on MSCAN 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    75
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    76
void __attribute__((interrupt)) can1HdlWup (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    77
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    78
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    79
Message error on MSCAN 1
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    80
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    81
void __attribute__((interrupt)) can1HdlErr (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    82
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    83
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    84
Message transmited on MSCAN 2
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    85
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    86
void __attribute__((interrupt)) can2HdlTra (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    87
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    88
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    89
Message received on MSCAN 2
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    90
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    91
void __attribute__((interrupt)) can2HdlRcv (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    92
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    93
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    94
Message error on MSCAN 2
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    95
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    96
void __attribute__((interrupt)) can2HdlWup (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    97
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    98
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    99
Message error on MSCAN 2
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   100
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   101
void __attribute__((interrupt)) can2HdlErr (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   102
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   103
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   104
Message transmited on MSCAN 3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   105
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   106
void __attribute__((interrupt)) can3HdlTra (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   107
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   108
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   109
Message received on MSCAN 3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   110
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   111
void __attribute__((interrupt)) can3HdlRcv (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   112
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   113
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   114
Message error on MSCAN 3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   115
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   116
void __attribute__((interrupt)) can3HdlWup (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   117
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   118
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   119
Message error on MSCAN 3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   120
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   121
void __attribute__((interrupt)) can3HdlErr (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   122
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   123
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   124
Message error on MSCAN 4
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   125
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   126
void __attribute__((interrupt)) can4HdlTra (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   127
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   128
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   129
Message received on MSCAN 4
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   130
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   131
void __attribute__((interrupt)) can4HdlRcv (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   132
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   133
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   134
Message error on MSCAN 4
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   135
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   136
void __attribute__((interrupt)) can4HdlWup (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   137
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   138
/**
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   139
Message error on MSCAN 4
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   140
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   141
void __attribute__((interrupt)) can4HdlErr (void);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   142
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   143
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
   144
#endif /* __INTERRUPT__  */