-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: pre_mi48
Are you sure you want to change the base?
Conversation
Signed-off-by: Abhishek Akkabathula <[email protected]>
Signed-off-by: Abhishek Akkabathula <[email protected]>
@@ -23,6 +23,10 @@ ifeq ($(CONFIG_SENSOR_PPD42NS),y) | |||
CSRCS += ppd42ns.c | |||
endif | |||
|
|||
ifeq ($(CONFIG_MI48),y) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)
...
}
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
No description provided.