-
Notifications
You must be signed in to change notification settings - Fork 443
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
Https/GitHub.com/alan840706/micropython #472
base: master
Are you sure you want to change the base?
Https/GitHub.com/alan840706/micropython #472
Conversation
@@ -0,0 +1 @@ | |||
|
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.
This empty file was added by mistake and needs to be cleaned up
@@ -257,6 +257,7 @@ void bmp_write_subimg(image_t *img, const char *path, rectangle_t *r) | |||
for (int i = 0; i < 256; i++) { | |||
write_long_raise(file, ((i) << 16) | ((i) << 8) | i); | |||
} | |||
printf("OK1!\n"); |
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.
Need to clean up unnecessary code
@@ -270,6 +271,7 @@ void bmp_write_subimg(image_t *img, const char *path, rectangle_t *r) | |||
} | |||
} | |||
} else { | |||
printf("OK2!\n"); |
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.
Need to clean up unnecessary code
@@ -31,7 +31,7 @@ int imlib_get_pixel(image_t *img, int x, int y) | |||
|
|||
// Set pixel (handles boundary check and image type check). | |||
void imlib_set_pixel(image_t *img, int x, int y, int p) | |||
{ | |||
{ |
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.
Unnecessary trailing space
@@ -652,18 +652,22 @@ STATIC mp_obj_t py_image_set_pixel(size_t n_args, const mp_obj_t *args, mp_map_t | |||
switch (arg_img->bpp) { | |||
case IMAGE_BPP_BINARY: { | |||
IMAGE_PUT_BINARY_PIXEL(arg_img, arg_x, arg_y, arg_c); | |||
//printf("0"); |
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.
Need to clean up unnecessary code
return args[0]; | ||
} | ||
case IMAGE_BPP_GRAYSCALE: { | ||
IMAGE_PUT_GRAYSCALE_PIXEL(arg_img, arg_x, arg_y, arg_c); | ||
//printf("1"); |
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.
Need to clean up unnecessary code
return args[0]; | ||
} | ||
case IMAGE_BPP_BAYER: { | ||
IMAGE_PUT_GRAYSCALE_PIXEL(arg_img, arg_x, arg_y, arg_c); // Correct! | ||
//printf("3"); |
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.
Need to clean up unnecessary code
|
||
// only MSB transfer is implemented | ||
|
||
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.
Unnecessary trailing space
@@ -142,10 +142,10 @@ void mp_soft_spi_transfer(void *self_in, size_t len, const uint8_t *src, uint8_t | |||
machine_hw_spi_obj_t *self = (machine_hw_spi_obj_t*)self_in; | |||
uint32_t delay_half = self->delay_half; | |||
|
|||
// printk("%s %d %d %d\r\n", __func__, self->pin_sck, self->pin_d[0], self->pin_d[1]); | |||
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.
Unnecessary trailing space
@@ -523,7 +523,7 @@ STATIC void mp_machine_spi_transfer(mp_obj_t self, size_t len, const void *src, | |||
spi_p->transfer(s, len, src, dest, cs); | |||
} | |||
|
|||
STATIC mp_obj_t mp_machine_spi_read(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { | |||
STATIC mp_obj_t mp_machine_spi_read(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { |
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.
Unnecessary trailing space
fifo_len = spi_handle->rxflr; | ||
|
||
//fifo_len = spi_handle->rxflr; | ||
fifo_len = rx_len; |
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.
Please explain the specific reason for the modification here
No description provided.