irda_demo -> irda_upload
This commit is contained in:
parent
5111beac86
commit
cf26f28cd0
@ -46,7 +46,7 @@
|
|||||||
#include "preferences_face.h"
|
#include "preferences_face.h"
|
||||||
#include "settings_face.h"
|
#include "settings_face.h"
|
||||||
#include "light_sensor_face.h"
|
#include "light_sensor_face.h"
|
||||||
#include "irda_demo_face.h"
|
#include "irda_upload_face.h"
|
||||||
#include "file_demo_face.h"
|
#include "file_demo_face.h"
|
||||||
#include "chirpy_demo_face.h"
|
#include "chirpy_demo_face.h"
|
||||||
// New includes go above this line.
|
// New includes go above this line.
|
||||||
|
|||||||
@ -21,7 +21,7 @@ SRCS += \
|
|||||||
./watch-faces/settings/preferences_face.c \
|
./watch-faces/settings/preferences_face.c \
|
||||||
./watch-faces/settings/settings_face.c \
|
./watch-faces/settings/settings_face.c \
|
||||||
./watch-faces/demo/light_sensor_face.c \
|
./watch-faces/demo/light_sensor_face.c \
|
||||||
./watch-faces/demo/irda_demo_face.c \
|
|
||||||
./watch-faces/demo/file_demo_face.c \
|
./watch-faces/demo/file_demo_face.c \
|
||||||
./watch-faces/io/chirpy_demo_face.c \
|
./watch-faces/io/chirpy_demo_face.c \
|
||||||
|
./watch-faces/io/irda_upload_face.c \
|
||||||
# New watch faces go above this line.
|
# New watch faces go above this line.
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
* FILE DISPLAY DEMO
|
* FILE DISPLAY DEMO
|
||||||
*
|
*
|
||||||
* Displays the contents of a file on the watch.
|
* Displays the contents of a file on the watch.
|
||||||
* For use with the irda_demo_face that allows uploading files to the watch.
|
* For use with the irda_upload_face that allows uploading files to the watch.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "irda_demo_face.h"
|
#include "irda_upload_face.h"
|
||||||
#include "tc.h"
|
#include "tc.h"
|
||||||
#include "eic.h"
|
#include "eic.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#ifdef HAS_IR_SENSOR
|
#ifdef HAS_IR_SENSOR
|
||||||
|
|
||||||
void irda_demo_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
void irda_upload_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
||||||
(void) watch_face_index;
|
(void) watch_face_index;
|
||||||
if (*context_ptr == NULL) {
|
if (*context_ptr == NULL) {
|
||||||
*context_ptr = malloc(sizeof(irda_demo_state_t));
|
*context_ptr = malloc(sizeof(irda_demo_state_t));
|
||||||
@ -42,7 +42,7 @@ void irda_demo_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void irda_demo_face_activate(void *context) {
|
void irda_upload_face_activate(void *context) {
|
||||||
irda_demo_state_t *state = (irda_demo_state_t *)context;
|
irda_demo_state_t *state = (irda_demo_state_t *)context;
|
||||||
(void) state;
|
(void) state;
|
||||||
HAL_GPIO_IR_ENABLE_out();
|
HAL_GPIO_IR_ENABLE_out();
|
||||||
@ -54,7 +54,7 @@ void irda_demo_face_activate(void *context) {
|
|||||||
uart_enable_instance(0);
|
uart_enable_instance(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool irda_demo_face_loop(movement_event_t event, void *context) {
|
bool irda_upload_face_loop(movement_event_t event, void *context) {
|
||||||
irda_demo_state_t *state = (irda_demo_state_t *)context;
|
irda_demo_state_t *state = (irda_demo_state_t *)context;
|
||||||
(void) state;
|
(void) state;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ bool irda_demo_face_loop(movement_event_t event, void *context) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void irda_demo_face_resign(void *context) {
|
void irda_upload_face_resign(void *context) {
|
||||||
(void) context;
|
(void) context;
|
||||||
uart_disable_instance(0);
|
uart_disable_instance(0);
|
||||||
HAL_GPIO_IRSENSE_pmuxdis();
|
HAL_GPIO_IRSENSE_pmuxdis();
|
||||||
@ -40,16 +40,16 @@ typedef struct {
|
|||||||
uint8_t unused;
|
uint8_t unused;
|
||||||
} irda_demo_state_t;
|
} irda_demo_state_t;
|
||||||
|
|
||||||
void irda_demo_face_setup(uint8_t watch_face_index, void ** context_ptr);
|
void irda_upload_face_setup(uint8_t watch_face_index, void ** context_ptr);
|
||||||
void irda_demo_face_activate(void *context);
|
void irda_upload_face_activate(void *context);
|
||||||
bool irda_demo_face_loop(movement_event_t event, void *context);
|
bool irda_upload_face_loop(movement_event_t event, void *context);
|
||||||
void irda_demo_face_resign(void *context);
|
void irda_upload_face_resign(void *context);
|
||||||
|
|
||||||
#define irda_demo_face ((const watch_face_t){ \
|
#define irda_upload_face ((const watch_face_t){ \
|
||||||
irda_demo_face_setup, \
|
irda_upload_face_setup, \
|
||||||
irda_demo_face_activate, \
|
irda_upload_face_activate, \
|
||||||
irda_demo_face_loop, \
|
irda_upload_face_loop, \
|
||||||
irda_demo_face_resign, \
|
irda_upload_face_resign, \
|
||||||
NULL, \
|
NULL, \
|
||||||
})
|
})
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user