Un-inline the SendAddress function in NVMTarget.c/.h of the AVRISP project.
[pub/USBasp.git] / Projects / AVRISP / Lib / ISPTarget.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2009.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 /** \file
32 *
33 * Header file for ISPTarget.c.
34 */
35
36 #ifndef _ISP_TARGET_
37 #define _ISP_TARGET_
38
39 /* Includes: */
40 #include <avr/io.h>
41 #include <util/delay.h>
42
43 #include <LUFA/Drivers/USB/USB.h>
44 #include <LUFA/Drivers/Peripheral/SPI.h>
45
46 #include "../Descriptors.h"
47 #include "V2ProtocolConstants.h"
48 #include "V2ProtocolParams.h"
49
50 /* Preprocessor Checks: */
51 #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
52 #undef ENABLE_ISP_PROTOCOL
53
54 #if !defined(ENABLE_PDI_PROTOCOL)
55 #define ENABLE_PDI_PROTOCOL
56 #endif
57 #endif
58
59 /* Macros: */
60 /** Total number of allowable ISP programming speeds supported by the device */
61 #define TOTAL_ISP_PROGRAMMING_SPEEDS 7
62
63 /* Function Prototypes: */
64 uint8_t ISPTarget_GetSPIPrescalerMask(void);
65 void ISPTarget_ChangeTargetResetLine(bool ResetTarget);
66 uint8_t ISPTarget_WaitForProgComplete(uint8_t ProgrammingMode, uint16_t PollAddress, uint8_t PollValue,
67 uint8_t DelayMS, uint8_t ReadMemCommand);
68 uint8_t ISPTarget_WaitWhileTargetBusy(void);
69 void ISPTarget_LoadExtendedAddress(void);
70
71 #endif