HL_Notification.c:
/* USER CODE BEGIN (11) */
extern void gioInterruptHandler();
/* USER CODE END */
#pragma WEAK(gioNotification)
void gioNotification(gioPORT_t *port, uint32 bit)
{
/* enter user code between the USER CODE BEGIN and USER CODE END. */
/* USER CODE BEGIN (22) */
gioInterruptHandler();
/* USER CODE END */
}
HL_Sys_Main.c:
/* USER CODE BEGIN (2) */
/* Choosing the SCI module used depending upon the device HDK */
#define sciREGx sciREG1
void sciDisplayText (sciBASE_t *sci, uint8_t *text,uint32_t length);
void gioInterruptHandler();
/* USER CODE END */
/* USER CODE BEGIN (4) */
void sciDisplayText(sciBASE_t *sci, uint8_t *text,uint32_t length)
{
while(length--)
{
while ((sci->FLR & 0x4) == 4); /* wait until busy */
sciSendByte(sci,*text++); /* send out text */
};
}
void gioInterruptHandler(){
sciDisplayText(sciREGx, (uint8_t*)"INTERRUPT GENERATED", sizeof("INTERRUPT GENERATED"));
sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
}
//This function is already in HL_notification.c
/* sci notification (Not used but must be provided)
void sciNotification(sciBASE_t *sci, uint32_t flags)
{
return;
}*/
/* USER CODE END */
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.