+20150614 4.3
+ - Added configurable disk geometry.
+ - Added configuration import/export function to scsi2sd-util
+ - scsi2sd-util stability fixes
+ - Fixes to support EMU EMAX1 & 2
+
20150504 4.2.4
- Clean up version number mishap (4.2.3 reported as 4.2.2)
- Reduce size of mode pages for SCSI1 hosts
--- /dev/null
+/*******************************************************************************
+* File Name: SCSI_SEL_ISR.c
+* Version 1.70
+*
+* Description:
+* API for controlling the state of an interrupt.
+*
+*
+* Note:
+*
+********************************************************************************
+* Copyright 2008-2012, Cypress Semiconductor Corporation. All rights reserved.
+* You may use this file only in accordance with the license, terms, conditions,
+* disclaimers, and limitations in the end user license agreement accompanying
+* the software package with which this file was provided.
+*******************************************************************************/
+
+
+#include <cydevice_trm.h>
+#include <CyLib.h>
+#include <SCSI_SEL_ISR.h>
+
+#if !defined(SCSI_SEL_ISR__REMOVED) /* Check for removal by optimization */
+
+/*******************************************************************************
+* Place your includes, defines and code here
+********************************************************************************/
+/* `#START SCSI_SEL_ISR_intc` */
+
+/* `#END` */
+
+#ifndef CYINT_IRQ_BASE
+#define CYINT_IRQ_BASE 16
+#endif /* CYINT_IRQ_BASE */
+#ifndef CYINT_VECT_TABLE
+#define CYINT_VECT_TABLE ((cyisraddress **) CYREG_NVIC_VECT_OFFSET)
+#endif /* CYINT_VECT_TABLE */
+
+/* Declared in startup, used to set unused interrupts to. */
+CY_ISR_PROTO(IntDefaultHandler);
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Start
+********************************************************************************
+*
+* Summary:
+* Set up the interrupt and enable it.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Start(void)
+{
+ /* For all we know the interrupt is active. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the SCSI_SEL_ISR Interrupt. */
+ SCSI_SEL_ISR_SetVector(&SCSI_SEL_ISR_Interrupt);
+
+ /* Set the priority. */
+ SCSI_SEL_ISR_SetPriority((uint8)SCSI_SEL_ISR_INTC_PRIOR_NUMBER);
+
+ /* Enable it. */
+ SCSI_SEL_ISR_Enable();
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_StartEx
+********************************************************************************
+*
+* Summary:
+* Set up the interrupt and enable it.
+*
+* Parameters:
+* address: Address of the ISR to set in the interrupt vector table.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_StartEx(cyisraddress address)
+{
+ /* For all we know the interrupt is active. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the SCSI_SEL_ISR Interrupt. */
+ SCSI_SEL_ISR_SetVector(address);
+
+ /* Set the priority. */
+ SCSI_SEL_ISR_SetPriority((uint8)SCSI_SEL_ISR_INTC_PRIOR_NUMBER);
+
+ /* Enable it. */
+ SCSI_SEL_ISR_Enable();
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Stop
+********************************************************************************
+*
+* Summary:
+* Disables and removes the interrupt.
+*
+* Parameters:
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Stop(void)
+{
+ /* Disable this interrupt. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the passive one. */
+ SCSI_SEL_ISR_SetVector(&IntDefaultHandler);
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Interrupt
+********************************************************************************
+*
+* Summary:
+* The default Interrupt Service Routine for SCSI_SEL_ISR.
+*
+* Add custom code between the coments to keep the next version of this file
+* from over writting your code.
+*
+* Parameters:
+*
+* Return:
+* None
+*
+*******************************************************************************/
+CY_ISR(SCSI_SEL_ISR_Interrupt)
+{
+ /* Place your Interrupt code here. */
+ /* `#START SCSI_SEL_ISR_Interrupt` */
+
+ /* `#END` */
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetVector
+********************************************************************************
+*
+* Summary:
+* Change the ISR vector for the Interrupt. Note calling SCSI_SEL_ISR_Start
+* will override any effect this method would have had. To set the vector
+* before the component has been started use SCSI_SEL_ISR_StartEx instead.
+*
+* Parameters:
+* address: Address of the ISR to set in the interrupt vector table.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetVector(cyisraddress address)
+{
+ cyisraddress * ramVectorTable;
+
+ ramVectorTable = (cyisraddress *) *CYINT_VECT_TABLE;
+
+ ramVectorTable[CYINT_IRQ_BASE + (uint32)SCSI_SEL_ISR__INTC_NUMBER] = address;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetVector
+********************************************************************************
+*
+* Summary:
+* Gets the "address" of the current ISR vector for the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* Address of the ISR in the interrupt vector table.
+*
+*******************************************************************************/
+cyisraddress SCSI_SEL_ISR_GetVector(void)
+{
+ cyisraddress * ramVectorTable;
+
+ ramVectorTable = (cyisraddress *) *CYINT_VECT_TABLE;
+
+ return ramVectorTable[CYINT_IRQ_BASE + (uint32)SCSI_SEL_ISR__INTC_NUMBER];
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetPriority
+********************************************************************************
+*
+* Summary:
+* Sets the Priority of the Interrupt. Note calling SCSI_SEL_ISR_Start
+* or SCSI_SEL_ISR_StartEx will override any effect this method
+* would have had. This method should only be called after
+* SCSI_SEL_ISR_Start or SCSI_SEL_ISR_StartEx has been called. To set
+* the initial priority for the component use the cydwr file in the tool.
+*
+* Parameters:
+* priority: Priority of the interrupt. 0 - 7, 0 being the highest.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetPriority(uint8 priority)
+{
+ *SCSI_SEL_ISR_INTC_PRIOR = priority << 5;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetPriority
+********************************************************************************
+*
+* Summary:
+* Gets the Priority of the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* Priority of the interrupt. 0 - 7, 0 being the highest.
+*
+*******************************************************************************/
+uint8 SCSI_SEL_ISR_GetPriority(void)
+{
+ uint8 priority;
+
+
+ priority = *SCSI_SEL_ISR_INTC_PRIOR >> 5;
+
+ return priority;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Enable
+********************************************************************************
+*
+* Summary:
+* Enables the interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Enable(void)
+{
+ /* Enable the general interrupt. */
+ *SCSI_SEL_ISR_INTC_SET_EN = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetState
+********************************************************************************
+*
+* Summary:
+* Gets the state (enabled, disabled) of the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* 1 if enabled, 0 if disabled.
+*
+*******************************************************************************/
+uint8 SCSI_SEL_ISR_GetState(void)
+{
+ /* Get the state of the general interrupt. */
+ return ((*SCSI_SEL_ISR_INTC_SET_EN & (uint32)SCSI_SEL_ISR__INTC_MASK) != 0u) ? 1u:0u;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Disable
+********************************************************************************
+*
+* Summary:
+* Disables the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Disable(void)
+{
+ /* Disable the general interrupt. */
+ *SCSI_SEL_ISR_INTC_CLR_EN = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetPending
+********************************************************************************
+*
+* Summary:
+* Causes the Interrupt to enter the pending state, a software method of
+* generating the interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetPending(void)
+{
+ *SCSI_SEL_ISR_INTC_SET_PD = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_ClearPending
+********************************************************************************
+*
+* Summary:
+* Clears a pending interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_ClearPending(void)
+{
+ *SCSI_SEL_ISR_INTC_CLR_PD = SCSI_SEL_ISR__INTC_MASK;
+}
+
+#endif /* End check for removal by optimization */
+
+
+/* [] END OF FILE */
--- /dev/null
+/*******************************************************************************
+* File Name: SCSI_SEL_ISR.h
+* Version 1.70
+*
+* Description:
+* Provides the function definitions for the Interrupt Controller.
+*
+*
+********************************************************************************
+* Copyright 2008-2012, Cypress Semiconductor Corporation. All rights reserved.
+* You may use this file only in accordance with the license, terms, conditions,
+* disclaimers, and limitations in the end user license agreement accompanying
+* the software package with which this file was provided.
+*******************************************************************************/
+#if !defined(CY_ISR_SCSI_SEL_ISR_H)
+#define CY_ISR_SCSI_SEL_ISR_H
+
+
+#include <cytypes.h>
+#include <cyfitter.h>
+
+/* Interrupt Controller API. */
+void SCSI_SEL_ISR_Start(void);
+void SCSI_SEL_ISR_StartEx(cyisraddress address);
+void SCSI_SEL_ISR_Stop(void);
+
+CY_ISR_PROTO(SCSI_SEL_ISR_Interrupt);
+
+void SCSI_SEL_ISR_SetVector(cyisraddress address);
+cyisraddress SCSI_SEL_ISR_GetVector(void);
+
+void SCSI_SEL_ISR_SetPriority(uint8 priority);
+uint8 SCSI_SEL_ISR_GetPriority(void);
+
+void SCSI_SEL_ISR_Enable(void);
+uint8 SCSI_SEL_ISR_GetState(void);
+void SCSI_SEL_ISR_Disable(void);
+
+void SCSI_SEL_ISR_SetPending(void);
+void SCSI_SEL_ISR_ClearPending(void);
+
+
+/* Interrupt Controller Constants */
+
+/* Address of the INTC.VECT[x] register that contains the Address of the SCSI_SEL_ISR ISR. */
+#define SCSI_SEL_ISR_INTC_VECTOR ((reg32 *) SCSI_SEL_ISR__INTC_VECT)
+
+/* Address of the SCSI_SEL_ISR ISR priority. */
+#define SCSI_SEL_ISR_INTC_PRIOR ((reg8 *) SCSI_SEL_ISR__INTC_PRIOR_REG)
+
+/* Priority of the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_PRIOR_NUMBER SCSI_SEL_ISR__INTC_PRIOR_NUM
+
+/* Address of the INTC.SET_EN[x] byte to bit enable SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_SET_EN ((reg32 *) SCSI_SEL_ISR__INTC_SET_EN_REG)
+
+/* Address of the INTC.CLR_EN[x] register to bit clear the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_CLR_EN ((reg32 *) SCSI_SEL_ISR__INTC_CLR_EN_REG)
+
+/* Address of the INTC.SET_PD[x] register to set the SCSI_SEL_ISR interrupt state to pending. */
+#define SCSI_SEL_ISR_INTC_SET_PD ((reg32 *) SCSI_SEL_ISR__INTC_SET_PD_REG)
+
+/* Address of the INTC.CLR_PD[x] register to clear the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_CLR_PD ((reg32 *) SCSI_SEL_ISR__INTC_CLR_PD_REG)
+
+
+#endif /* CY_ISR_SCSI_SEL_ISR_H */
+
+
+/* [] END OF FILE */
const uint8 cy_meta_loadable[] = {\r
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
- 0x00u, 0x00u, 0x00u, 0x00u, 0x5Cu, 0xD1u, 0x24u, 0x04u,\r
+ 0x00u, 0x00u, 0x00u, 0x00u, 0x5Cu, 0xD1u, 0x30u, 0x04u,\r
0x01u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,\r
--- /dev/null
+/*******************************************************************************
+* File Name: SCSI_SEL_ISR.c
+* Version 1.70
+*
+* Description:
+* API for controlling the state of an interrupt.
+*
+*
+* Note:
+*
+********************************************************************************
+* Copyright 2008-2012, Cypress Semiconductor Corporation. All rights reserved.
+* You may use this file only in accordance with the license, terms, conditions,
+* disclaimers, and limitations in the end user license agreement accompanying
+* the software package with which this file was provided.
+*******************************************************************************/
+
+
+#include <cydevice_trm.h>
+#include <CyLib.h>
+#include <SCSI_SEL_ISR.h>
+
+#if !defined(SCSI_SEL_ISR__REMOVED) /* Check for removal by optimization */
+
+/*******************************************************************************
+* Place your includes, defines and code here
+********************************************************************************/
+/* `#START SCSI_SEL_ISR_intc` */
+
+/* `#END` */
+
+#ifndef CYINT_IRQ_BASE
+#define CYINT_IRQ_BASE 16
+#endif /* CYINT_IRQ_BASE */
+#ifndef CYINT_VECT_TABLE
+#define CYINT_VECT_TABLE ((cyisraddress **) CYREG_NVIC_VECT_OFFSET)
+#endif /* CYINT_VECT_TABLE */
+
+/* Declared in startup, used to set unused interrupts to. */
+CY_ISR_PROTO(IntDefaultHandler);
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Start
+********************************************************************************
+*
+* Summary:
+* Set up the interrupt and enable it.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Start(void)
+{
+ /* For all we know the interrupt is active. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the SCSI_SEL_ISR Interrupt. */
+ SCSI_SEL_ISR_SetVector(&SCSI_SEL_ISR_Interrupt);
+
+ /* Set the priority. */
+ SCSI_SEL_ISR_SetPriority((uint8)SCSI_SEL_ISR_INTC_PRIOR_NUMBER);
+
+ /* Enable it. */
+ SCSI_SEL_ISR_Enable();
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_StartEx
+********************************************************************************
+*
+* Summary:
+* Set up the interrupt and enable it.
+*
+* Parameters:
+* address: Address of the ISR to set in the interrupt vector table.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_StartEx(cyisraddress address)
+{
+ /* For all we know the interrupt is active. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the SCSI_SEL_ISR Interrupt. */
+ SCSI_SEL_ISR_SetVector(address);
+
+ /* Set the priority. */
+ SCSI_SEL_ISR_SetPriority((uint8)SCSI_SEL_ISR_INTC_PRIOR_NUMBER);
+
+ /* Enable it. */
+ SCSI_SEL_ISR_Enable();
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Stop
+********************************************************************************
+*
+* Summary:
+* Disables and removes the interrupt.
+*
+* Parameters:
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Stop(void)
+{
+ /* Disable this interrupt. */
+ SCSI_SEL_ISR_Disable();
+
+ /* Set the ISR to point to the passive one. */
+ SCSI_SEL_ISR_SetVector(&IntDefaultHandler);
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Interrupt
+********************************************************************************
+*
+* Summary:
+* The default Interrupt Service Routine for SCSI_SEL_ISR.
+*
+* Add custom code between the coments to keep the next version of this file
+* from over writting your code.
+*
+* Parameters:
+*
+* Return:
+* None
+*
+*******************************************************************************/
+CY_ISR(SCSI_SEL_ISR_Interrupt)
+{
+ /* Place your Interrupt code here. */
+ /* `#START SCSI_SEL_ISR_Interrupt` */
+
+ /* `#END` */
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetVector
+********************************************************************************
+*
+* Summary:
+* Change the ISR vector for the Interrupt. Note calling SCSI_SEL_ISR_Start
+* will override any effect this method would have had. To set the vector
+* before the component has been started use SCSI_SEL_ISR_StartEx instead.
+*
+* Parameters:
+* address: Address of the ISR to set in the interrupt vector table.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetVector(cyisraddress address)
+{
+ cyisraddress * ramVectorTable;
+
+ ramVectorTable = (cyisraddress *) *CYINT_VECT_TABLE;
+
+ ramVectorTable[CYINT_IRQ_BASE + (uint32)SCSI_SEL_ISR__INTC_NUMBER] = address;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetVector
+********************************************************************************
+*
+* Summary:
+* Gets the "address" of the current ISR vector for the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* Address of the ISR in the interrupt vector table.
+*
+*******************************************************************************/
+cyisraddress SCSI_SEL_ISR_GetVector(void)
+{
+ cyisraddress * ramVectorTable;
+
+ ramVectorTable = (cyisraddress *) *CYINT_VECT_TABLE;
+
+ return ramVectorTable[CYINT_IRQ_BASE + (uint32)SCSI_SEL_ISR__INTC_NUMBER];
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetPriority
+********************************************************************************
+*
+* Summary:
+* Sets the Priority of the Interrupt. Note calling SCSI_SEL_ISR_Start
+* or SCSI_SEL_ISR_StartEx will override any effect this method
+* would have had. This method should only be called after
+* SCSI_SEL_ISR_Start or SCSI_SEL_ISR_StartEx has been called. To set
+* the initial priority for the component use the cydwr file in the tool.
+*
+* Parameters:
+* priority: Priority of the interrupt. 0 - 7, 0 being the highest.
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetPriority(uint8 priority)
+{
+ *SCSI_SEL_ISR_INTC_PRIOR = priority << 5;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetPriority
+********************************************************************************
+*
+* Summary:
+* Gets the Priority of the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* Priority of the interrupt. 0 - 7, 0 being the highest.
+*
+*******************************************************************************/
+uint8 SCSI_SEL_ISR_GetPriority(void)
+{
+ uint8 priority;
+
+
+ priority = *SCSI_SEL_ISR_INTC_PRIOR >> 5;
+
+ return priority;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Enable
+********************************************************************************
+*
+* Summary:
+* Enables the interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Enable(void)
+{
+ /* Enable the general interrupt. */
+ *SCSI_SEL_ISR_INTC_SET_EN = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_GetState
+********************************************************************************
+*
+* Summary:
+* Gets the state (enabled, disabled) of the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* 1 if enabled, 0 if disabled.
+*
+*******************************************************************************/
+uint8 SCSI_SEL_ISR_GetState(void)
+{
+ /* Get the state of the general interrupt. */
+ return ((*SCSI_SEL_ISR_INTC_SET_EN & (uint32)SCSI_SEL_ISR__INTC_MASK) != 0u) ? 1u:0u;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_Disable
+********************************************************************************
+*
+* Summary:
+* Disables the Interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_Disable(void)
+{
+ /* Disable the general interrupt. */
+ *SCSI_SEL_ISR_INTC_CLR_EN = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_SetPending
+********************************************************************************
+*
+* Summary:
+* Causes the Interrupt to enter the pending state, a software method of
+* generating the interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_SetPending(void)
+{
+ *SCSI_SEL_ISR_INTC_SET_PD = SCSI_SEL_ISR__INTC_MASK;
+}
+
+
+/*******************************************************************************
+* Function Name: SCSI_SEL_ISR_ClearPending
+********************************************************************************
+*
+* Summary:
+* Clears a pending interrupt.
+*
+* Parameters:
+* None
+*
+* Return:
+* None
+*
+*******************************************************************************/
+void SCSI_SEL_ISR_ClearPending(void)
+{
+ *SCSI_SEL_ISR_INTC_CLR_PD = SCSI_SEL_ISR__INTC_MASK;
+}
+
+#endif /* End check for removal by optimization */
+
+
+/* [] END OF FILE */
--- /dev/null
+/*******************************************************************************
+* File Name: SCSI_SEL_ISR.h
+* Version 1.70
+*
+* Description:
+* Provides the function definitions for the Interrupt Controller.
+*
+*
+********************************************************************************
+* Copyright 2008-2012, Cypress Semiconductor Corporation. All rights reserved.
+* You may use this file only in accordance with the license, terms, conditions,
+* disclaimers, and limitations in the end user license agreement accompanying
+* the software package with which this file was provided.
+*******************************************************************************/
+#if !defined(CY_ISR_SCSI_SEL_ISR_H)
+#define CY_ISR_SCSI_SEL_ISR_H
+
+
+#include <cytypes.h>
+#include <cyfitter.h>
+
+/* Interrupt Controller API. */
+void SCSI_SEL_ISR_Start(void);
+void SCSI_SEL_ISR_StartEx(cyisraddress address);
+void SCSI_SEL_ISR_Stop(void);
+
+CY_ISR_PROTO(SCSI_SEL_ISR_Interrupt);
+
+void SCSI_SEL_ISR_SetVector(cyisraddress address);
+cyisraddress SCSI_SEL_ISR_GetVector(void);
+
+void SCSI_SEL_ISR_SetPriority(uint8 priority);
+uint8 SCSI_SEL_ISR_GetPriority(void);
+
+void SCSI_SEL_ISR_Enable(void);
+uint8 SCSI_SEL_ISR_GetState(void);
+void SCSI_SEL_ISR_Disable(void);
+
+void SCSI_SEL_ISR_SetPending(void);
+void SCSI_SEL_ISR_ClearPending(void);
+
+
+/* Interrupt Controller Constants */
+
+/* Address of the INTC.VECT[x] register that contains the Address of the SCSI_SEL_ISR ISR. */
+#define SCSI_SEL_ISR_INTC_VECTOR ((reg32 *) SCSI_SEL_ISR__INTC_VECT)
+
+/* Address of the SCSI_SEL_ISR ISR priority. */
+#define SCSI_SEL_ISR_INTC_PRIOR ((reg8 *) SCSI_SEL_ISR__INTC_PRIOR_REG)
+
+/* Priority of the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_PRIOR_NUMBER SCSI_SEL_ISR__INTC_PRIOR_NUM
+
+/* Address of the INTC.SET_EN[x] byte to bit enable SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_SET_EN ((reg32 *) SCSI_SEL_ISR__INTC_SET_EN_REG)
+
+/* Address of the INTC.CLR_EN[x] register to bit clear the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_CLR_EN ((reg32 *) SCSI_SEL_ISR__INTC_CLR_EN_REG)
+
+/* Address of the INTC.SET_PD[x] register to set the SCSI_SEL_ISR interrupt state to pending. */
+#define SCSI_SEL_ISR_INTC_SET_PD ((reg32 *) SCSI_SEL_ISR__INTC_SET_PD_REG)
+
+/* Address of the INTC.CLR_PD[x] register to clear the SCSI_SEL_ISR interrupt. */
+#define SCSI_SEL_ISR_INTC_CLR_PD ((reg32 *) SCSI_SEL_ISR__INTC_CLR_PD_REG)
+
+
+#endif /* CY_ISR_SCSI_SEL_ISR_H */
+
+
+/* [] END OF FILE */
" <vendor>" << std::string(config.vendor, 8) << "</vendor>\n" <<
"\n" <<
" <!-- 16 character produce identifier -->\n" <<
- " <!-- For Apple HD SC Setup/Drive Setup, use ' ST225N' -->\n" <<
+ " <!-- For Apple HD SC Setup/Drive Setup, use ' ST225N' -->\n" <<
" <prodId>" << std::string(config.prodId, 16) << "</prodId>\n" <<
"\n" <<
" <!-- 4 character product revision number -->\n" <<
CPPFLAGS = -I cybootloaderutils -I hidapi/hidapi -I ../include -Ilibzipper-1.0.4 -I$(BUILD)/zlib
CFLAGS += -Wall -Wno-pointer-sign -O2 -g
CXXFLAGS += -Wall -O2 -g -std=c++0x
-LDFLAGS += -L$(BUILD)/libzipper/.libs -lzipper -L$(BUILD)/zlib -lz -lexpat
+LDFLAGS += -L$(BUILD)/libzipper/.libs -lzipper -L$(BUILD)/zlib -lz
LIBZIPPER_CONFIG = --disable-shared LDFLAGS="-L../zlib" CPPFLAGS="-I../zlib"
endif
ifeq ($(TARGET),Linux)
VPATH += hidapi/linux
- LDFLAGS += -ludev
+ LDFLAGS += -ludev -lexpat
BUILD = build/linux
endif
ifeq ($(TARGET),Darwin)
# Should match OSX
VPATH += hidapi-mac
- LDFLAGS += -framework IOKit -framework CoreFoundation
+ LDFLAGS += -framework IOKit -framework CoreFoundation -lexpat
CC=clang -mmacosx-version-min=10.7
CXX=clang++ -stdlib=libc++ -mmacosx-version-min=10.7
WX_CONFIG += --with-macosx-version-min=10.7
#include <wx/wx.h>
#endif
+#include <wx/app.h>
#include <wx/filedlg.h>
#include <wx/filefn.h>
#include <wx/filename.h>
}
// Note: Don't confuse this with the wxApp::OnExit virtual method
- void OnExitEvt(wxCommandEvent& event)
- {
- Close(true);
- }
+ void OnExitEvt(wxCommandEvent& event);
+
+ void OnCloseEvt(wxCloseEvent& event);
void OnAbout(wxCommandEvent& event)
{
EVT_BUTTON(ID_BtnSave, AppFrame::doSave)
EVT_BUTTON(ID_BtnLoad, AppFrame::doLoad)
+ EVT_CLOSE(AppFrame::OnCloseEvt)
wxEND_EVENT_TABLE()
// Main Method
wxIMPLEMENT_APP(App);
+void
+AppFrame::OnExitEvt(wxCommandEvent& event)
+{
+ wxGetApp().ExitMainLoop();
+}
+
+void
+AppFrame::OnCloseEvt(wxCloseEvent& event)
+{
+ wxGetApp().ExitMainLoop();
+}