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

code style in juma_sdk_api.h #14

Open
gilbertjuly opened this issue Jan 31, 2016 · 0 comments
Open

code style in juma_sdk_api.h #14

gilbertjuly opened this issue Jan 31, 2016 · 0 comments

Comments

@gilbertjuly
Copy link
Collaborator

I see there is a bunch of APIs listed in juma_sdk_api.h.

However, all of they are mixed together, I suggest APIs of different categories should be separated.

For example:

/*BLE*/
void ble_device_get_id(uint8_t* id, uint8_t len);
void ble_device_select_address(uint8_t id);
void ble_device_set_name(const char* device_name);
void ble_device_set_advertising_interval(uint16_t interval);
void ble_device_set_tx_power(int8_t tx_power);
void ble_device_start_advertising(void);
void ble_device_stop_advertising(void);
void ble_device_disconnect(void);

/*spi*/
void spi_setup(spi_init_struct_t * spi_struct);
void spi_transmit_receive(uint8_t * tx_buff, uint8_t * rx_buff, uint32_t buff_len);

/*GUI*/
void gfx_init_screen(uint8_t* buffer, uint16_t width, uint16_t height, uint8_t flags);
void gfx_clear(void);
void gfx_draw_pixel(uint16_t x, uint16_t y, uint8_t ppo);
void gfx_draw_line(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t ppo);
void gfx_draw_rect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t ppo);
void gfx_fill_rect(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t ppo);
void gfx_draw_circle(uint16_t x, uint16_t y, uint16_t r, uint8_t ppo);
void gfx_fill_circle(uint16_t x, uint16_t y, uint16_t r, uint8_t ppo);
void gfx_set_font(const gfx_font_t* font);

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

No branches or pull requests

1 participant