shizacat commented on issue #14816:
URL: https://github.com/apache/nuttx/issues/14816#issuecomment-2562269497

   @acassis 
   Hello, I want to try to change the implementation of the ADC driver to work 
through components/hal.
   But I encountered difficulties.
   I thought to take a ready-made component 
esp-hal-3rdparty/components/esp_adc, in particular adc_oneshot.c.
   
   It is not so easy to build - 
[adc_oneshot.c](https://github.com/espressif/esp-hal-3rdparty/blob/release/v5.1.c/components/esp_adc/adc_oneshot.c).
   - error in include
   - methods heap_caps_calloc
   - undeclared defines MALLOC_CAP_DEFAULT, RTC_GPIO_MODE_DISABLED
   - critical sections
   
   [esp-hal-3rdparty](https://github.com/espressif/esp-hal-3rdparty) - how can 
I make changes there (send MR).
   
   There are also questions about the changes themselves, example:
   - portENTER_CRITICAL vs portENTER_CRITICAL_SAFE (what should be used for 
Nuttx - spin_lock_irqsave, spin_lock, enter_critical_section). 
   - and other questions
   
   And in general, I'm not sure if I'm moving in the right direction.
   
   Could you help, how to do it correctly (may be it is not necessary to do 
this and someone is already doing it).
   Use components directly, or do you need some low-level 'hal' methods, but 
then it seems like it will be a repetition of the component. Maybe this doesn't 
need to be done at all due to the license or the project architecture.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to