nasa / bplib

Apache License 2.0
27 stars 13 forks source link

Flash storage service initialization in Lua binding needs parameterization #48

Closed jpswinski closed 4 years ago

jpswinski commented 4 years ago

There is a handful of user provided customization needed to use the flash storage service - a flash driver, the init_mode, and whether EDAC is being implemented in software. Currently, these are hardcoded when the bplib library is loaded into lua. They need to somehow be exposed to the user.

jpswinski commented 4 years ago

There isn't a good way to expose arbitrary flash drivers to the flash storage service within a lua script without an extensive rework. I'd need to have a way for users to load their own lua extensions that contain the flash driver, and then a way to hook them into the flash storage service. While this may be desirable at some point, it is out of scope currently.

The above change localizes the initialization of the flash storage service into one function to make it easier to modify if needed for another application. This will have to do for now.