Skip to content

drivers: meter: ade9153a : Add README documentation for ADE9153a #2563

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mc-so
Copy link

@mc-so mc-so commented Apr 23, 2025

Signed-off-by: mc-so michelleclaire.so@analog.com

This adds the rst readme document for the ADE9153a driver.

Also modified the sphinx driver doc to add the corresponding source for this new readme.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

Signed-off-by: mc-so <michelleclaire.so@analog.com>

This adds the rst readme document for the ADE9153a driver.

Also modified the sphinx driver doc to add the corresponding source for
this new readme.
@CLAassistant
Copy link

CLAassistant commented Apr 23, 2025

CLA assistant check
All committers have signed the CLA.

return ret;
}


Copy link
Contributor

Choose a reason for hiding this comment

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

the lines from here down shouldn't be here

int main()
{
struct ade9153a_dev *ade9153a_dev;
struct ade9153a_init_param ade9153a_ip;
Copy link
Contributor

Choose a reason for hiding this comment

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

initialize ade9153a_ip with actual values

// Burst mode disable
ade9153a_dev->burst_en = 0;

no_os_mdelay(RESET_TIME);
Copy link
Contributor

Choose a reason for hiding this comment

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

define RESET_TIME

goto free_dev;

// Burst mode disable
ade9153a_dev->burst_en = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is bad in my opinion, maybe the driver needs to be modified, the user shouldn't need to modify descriptor members like this, but through the driver API


while (1) {
// Time delay between readings
no_os_mdelay(READ_INTERVAL);
Copy link
Contributor

Choose a reason for hiding this comment

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

define READ_INTERVAL

remove_uart:
no_os_uart_remove(uart_desc);
remove_irq:
no_os_irq_ctrl_remove(ade9153a_nvic_desc);
Copy link
Contributor

Choose a reason for hiding this comment

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

i am not sure what's with all these remove calls here, only remove what you initialize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants