Goal
So just to make sure the goal of my intentions are clear. I never tried to merge this code into the repo because i knew it wasn't good enough to go into the main project. The goal was just to see if this was something worth doing.
LCD_BL
So that's a bug from my lack of knowledge on the "LPM013M126". There's a lcdMemLCD_extcominBacklight and it has a BL pin. So in theory the BL pin should just be in the bangle_backlight_impl.c for hardware that is generic across devices.
LPM013M126
Yes this is for the bangle device. I wanted all the files to mostly be hardware and not device specific. I figured anybody going to try and work on the bangle.js c code, will figure out what hardware is in it.
7 files for backlight
So i can break down the numbers
2 files for jswrap_bangle_hardware.c/h - these hold the JavaScript functions and no hardware specific stuff.
2 files for bangle_hardware.c/h - holds generic functions that can be overwritten by device specific calls.
X files- X being the number unique pieces of hardware that need functions being overwritten
So for some of these the override files are extremely small and look like a waste of time, but even for just lighting the F18 and the fade implementation both use more then 60 lines each and the code for them was not just in one place but all spread through the project. So for me i can navigate this structure a little better. But i do agree this add a lot of files, but the complexity of the device won't make the number of files go up you'll just have more functions in the file. You can see this in the display vs backlight driver. Same amount of files, but the display driver has way more in it.
finding all the function github is a nightmare
Yes, i would 100% agree. Nightmare is probably underselling that issue. My software style is to have code very spread out. I like my code to fit under that 100 line limit so i don't need to scroll to much. This is probably do to my setup. I personally use like 2 large monitors or up to 4 small monitors at any given time. So i use multiple instances of visual studio code. So i me its completely normal to trace through functions calls.
Code Flow
My goal would be such that jswrap_bangle.c would only hold basic states of the watch. So a startup,events,shutdown. Then the rest would be in the hardware folder.
Final Note
So these are just my thoughts to hopefully clear up some of the topics above. This specific post doesn't need a response if you don't want too. I think i understand were your coming from. Well at the minimum trying my best to.
This took me a while to wright up. So I'll post the WHY I'm doing this in a little bit.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Goal
So just to make sure the goal of my intentions are clear. I never tried to merge this code into the repo because i knew it wasn't good enough to go into the main project. The goal was just to see if this was something worth doing.
LCD_BL
So that's a bug from my lack of knowledge on the "LPM013M126". There's a lcdMemLCD_extcominBacklight and it has a BL pin. So in theory the BL pin should just be in the bangle_backlight_impl.c for hardware that is generic across devices.
LPM013M126
Yes this is for the bangle device. I wanted all the files to mostly be hardware and not device specific. I figured anybody going to try and work on the bangle.js c code, will figure out what hardware is in it.
7 files for backlight
So i can break down the numbers
So for some of these the override files are extremely small and look like a waste of time, but even for just lighting the F18 and the fade implementation both use more then 60 lines each and the code for them was not just in one place but all spread through the project. So for me i can navigate this structure a little better. But i do agree this add a lot of files, but the complexity of the device won't make the number of files go up you'll just have more functions in the file. You can see this in the display vs backlight driver. Same amount of files, but the display driver has way more in it.
finding all the function github is a nightmare
Yes, i would 100% agree. Nightmare is probably underselling that issue. My software style is to have code very spread out. I like my code to fit under that 100 line limit so i don't need to scroll to much. This is probably do to my setup. I personally use like 2 large monitors or up to 4 small monitors at any given time. So i use multiple instances of visual studio code. So i me its completely normal to trace through functions calls.
Code Flow
My goal would be such that jswrap_bangle.c would only hold basic states of the watch. So a startup,events,shutdown. Then the rest would be in the hardware folder.
Final Note
So these are just my thoughts to hopefully clear up some of the topics above. This specific post doesn't need a response if you don't want too. I think i understand were your coming from. Well at the minimum trying my best to.
This took me a while to wright up. So I'll post the WHY I'm doing this in a little bit.