Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

160 board hal #183

Merged
merged 21 commits into from
Jun 3, 2022
Merged

160 board hal #183

merged 21 commits into from
Jun 3, 2022

Conversation

mickeprag
Copy link
Contributor

Redo pull request #168

Yardie- and others added 18 commits May 10, 2022 15:04
* added epd_powerdown

On lilygo disable display power but not touch screen.
  The epd power flag was re-purposed as power enable
   however it also disables the touch.
  this workaround may still leave power on to epd
  and as such may cause other problems such as grey screen.
  please also use poweroff when you sleep the system
  wake on touch will still work just not the I2C interface.

* lilygo epd_powerdown note in readme

Sorry it's not the prettiest thing.

* Documentation change

Deoxygenised the comments on the function so it will be explained in the readthedocs.io

* Clarify readme

* Finish readme  for lily go

* Clean up

* Oops
Instead of using defines to set the board hardware definitions each
board get its own file with the routines to access the hardware
functions. This way also third party boards can be implemented
without being required to modify the epdiy source.

So far only logic from display_ops.c has been ported. Work still
also exists to optimize duplicated code.

Care has been taken to not break existing code bases. If a board is
defined in menuconfig this will still be used.
The goal is to get rid of the config_reg_v*.h files
This should not be done for individual boards.
Boards specific code should be marked as such.
Move signals oe, mode and stv to this
Implement start_frame using the ctrl interface
@martinberlin martinberlin self-assigned this Jun 1, 2022
@martinberlin martinberlin added the refactoring This are core upgrades label Jun 1, 2022
@martinberlin
Copy link
Collaborator

Hello Micke,
Just updating my local copy for testing.
selecting in menuconfig:

Display Type (ED047TC1 LILYGO 4.7 inch, correct grays)  --->
Board / Board Revision (LILYGO T5-4.7 inch e-paper)  --->

And doing an idf.py build I'm getting the following:

 implicit declaration of function 'cfg_powerdown'; did you mean 'epd_powerdown'? [-Werror=implicit-function-declaration]
   cfg_powerdown(&config_reg);
   ^~~~~~~~~~~~~
   epd_powerdown
/home/martin/esp/projects/pull-requests/epdiy-micke/src/epd_driver/display_ops.c:45:18: error: 'config_reg' undeclared (first use in this function); did you mean 'configMAX'?
   cfg_powerdown(&config_reg);
                  ^~~~~~~~~~
                  configMAX
/home/martin/esp/projects/pull-requests/epdiy-micke/src/epd_driver/display_ops.c:45:18: note: each undeclared identifier is reported only once for each function it appears in
/home/martin/esp/projects/pull-requests/epdiy-mi`cke/src/epd_driver/display_ops.c:46:3: error: too few arguments to function 'i2s_gpio_detach'
   i2s_gpio_detach();
   ^~~~~~~~~~~~~~~
In file included from /home/martin/esp/projects/pull-requests/epdiy-micke/src/epd_driver/display_ops.c:4:
/home/martin/esp/projects/pull-requests/epdiy-micke/src/epd_driver/i2s_data_bus.h:47:6: note: declared here
 void i2s_gpio_detach(i2s_bus_config *cfg);
      ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Can be that there are something's missing for this Lilygo board configuration?
I've one so I can help you to test it.

@martinberlin
Copy link
Collaborator

A short heads up about this Lilygo update in #179
This merge in a single commit: fd8a290

was reversed since it added a function cfg_powerdown is a exact copy of existing funcion cfg_poweroff

So I guess you can simplify this part and make it for now the same as all the other boards. This fix, was not proposed correctly, and also is about keeping touch on due to a bad hardware design from the Lilygo board that IMHO should be not part of this component.

This makes vcom voltage available at runtime and not at compile time
This will leave touch screen powered when power off
@mickeprag
Copy link
Contributor Author

Can be that there are something's missing for this Lilygo board configuration?
I've one so I can help you to test it.

Looks like I left some old code. I removed it now. Please try it again.

Copy link
Collaborator

@martinberlin martinberlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me, will test again at home with some boards, are we ready to merge tonight?

src/epd_driver/display_ops.c Outdated Show resolved Hide resolved
@mickeprag
Copy link
Contributor Author

Everything looks good to me, will test again at home with some boards, are we ready to merge tonight?

Yes, I you cannot find anything else then yes

@martinberlin martinberlin merged commit ba1ec7a into vroland:master Jun 3, 2022
@mickeprag mickeprag deleted the 160-board_hal branch August 26, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring This are core upgrades
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants