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

sensors/mi48: add support for mi48 thermal camera #3

Open
wants to merge 2 commits into
base: pre_mi48
Choose a base branch
from

Conversation

abhishek-samsung
Copy link
Owner

No description provided.

@@ -23,6 +23,10 @@ ifeq ($(CONFIG_SENSOR_PPD42NS),y)
CSRCS += ppd42ns.c
endif

ifeq ($(CONFIG_MI48),y)

Choose a reason for hiding this comment

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

CONFIG_SENSOR_MI48

****************************************************************************/
#define DEVNAME_FORMAT "/dev/img%d"

#define GPIO_RESET PA_0 // will set it to the right pin after wards

Choose a reason for hiding this comment

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

so these pin numbers are only things related to rtl8721.
Then we can change init function as below, then we can merge this file with mi48.c

/** doxygen to explain each of params ...**/
int mi48_register(FAR const char *devname, FAR struct mi48_lower_s *lower, FAR struct i2c_dev_s *i2c, FAR struct spi_dev_s *spi, gpio_t pin1, gpio_t pin2) // but reset is necessary?
{
    ...
   gpio_irq_init(&(g_rtl8721csm_dev.gpio_info.data_ready), pin1)
   ...
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

gpio initializations, gpio control and attaching irq handlers for gpio interrupts are all board specific logic, so I wanted to keep it seperate from the sensor code, which is common for all boards.

board_i2c_initialize();
board_spi_initialize();
// board_i2c_initialize();
// board_spi_initialize();
Copy link
Owner Author

Choose a reason for hiding this comment

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

test

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.

2 participants