|
|
@@ -2,7 +2,6 @@
|
|
|
|
|
|
nBus_TypeDef nBus;
|
|
|
|
|
|
-
|
|
|
static uint8_t const crc8x_table[] = {
|
|
|
0x00,0x07,0x0E,0x09,0x1C,0x1B,0x12,0x15,0x38,0x3F,0x36,0x31,0x24,0x23,0x2A,0x2D,
|
|
|
0x70,0x77,0x7E,0x79,0x6C,0x6B,0x62,0x65,0x48,0x4F,0x46,0x41,0x54,0x53,0x5A,0x5D,
|
|
|
@@ -213,12 +212,16 @@ void nbus_init_app(void *hw_interface, void *hw_config){
|
|
|
nBus.interface->init(hw_interface, hw_config);
|
|
|
}
|
|
|
|
|
|
+void nbus_init_memory_driver(nBus_MemoryDriver *memDriver, uint16_t capacity){
|
|
|
+ nbus_memory_init(memDriver);
|
|
|
+ nBus.memoryInterface = getnbusMemoryInterface();
|
|
|
+}
|
|
|
+
|
|
|
void nbus_stack(void){
|
|
|
receiveOneByte();
|
|
|
|
|
|
while(1){
|
|
|
if(nBus.uart_state == UART_RECEIVED){
|
|
|
- //HAL_TIM_Base_Stop_IT(nBus.periph->uart_timer);
|
|
|
|
|
|
process_request();
|
|
|
|