Feature/add spi master test example for bdk (#1027)

This commit is contained in:
Steve Karg
2025-06-21 13:04:54 -05:00
committed by GitHub
parent 14f033ceda
commit 9e626e599b
4 changed files with 121 additions and 5 deletions
+6
View File
@@ -16,6 +16,7 @@
#include "rs485.h"
#include "bacnet/datalink/dlmstp.h"
#include "seeprom.h"
#include "spi-master.h"
#include "nvdata.h"
/* me */
#include "test.h"
@@ -47,6 +48,7 @@ void test_init(void)
#else
BIT_SET(DDRB, DDB0);
#endif
spi_master_init();
}
/**
@@ -194,6 +196,10 @@ void test_task(void)
"\r\nMax:%u", (unsigned)dlmstp_max_master());
serial_bytes_send((uint8_t *)Send_Buffer, strlen(Send_Buffer));
break;
case 's':
data_register = spi_master_transfer(0xBA);
snprintf(Send_Buffer, sizeof(Send_Buffer), "\r\nSPI:%02Xh", data_register);
break;
default:
break;
}