| 1234567891011121314151617181920212223242526272829303132 |
- /*
- * nbus_memory.c
- *
- * Created on: Nov 4, 2023
- * Author: juraj
- */
- #include "nbus_memory.h"
- nBus_MemoryDriver *memoryImplementation;
- nBus_memoryInterface_t memory_itnerface = {
- nbus_store_param,
- nbus_read_param
- };
- nBus_memoryInterface_t *getnbusMemoryInterface(void){
- return &memory_itnerface;
- }
- void nbus_memory_init(nBus_MemoryDriver *driver){
- memoryImplementation = driver;
- }
- nBus_memoryState_t nbus_store_param(uint8_t sensor_index, uint8_t param_name, uint32_t param_value){
- return MEMORY_STORE_OK;
- }
- uint32_t nbus_read_param(uint8_t sensor_index, uint8_t param_name){
- uint16_t adr = sensor_index + param_name;
- return memoryImplementation->read_word(adr);;
- }
|