Compare commits

...

7 Commits

Author SHA1 Message Date
alan 79f58fce9f Merge remote-tracking branch 'origin/elite_zm/alan' into elite_zm/alan 2019-07-03 15:14:14 +08:00
alan 6472622002 test compile 2019-07-03 15:13:46 +08:00
YiChin 5e3d7d34df bug fix 2019-06-06 15:15:45 +08:00
alan 0535498711 test 2019-06-06 11:45:44 +08:00
YiChin 2e7377787b SPI init has a bug 2019-05-14 13:09:53 +08:00
alan 47d43a27da power on scan test 2019-05-14 11:16:12 +08:00
YiChin b448eeb958 warning fix 2019-05-14 11:11:09 +08:00
8 changed files with 38 additions and 21 deletions
@@ -23,7 +23,7 @@ Instruction Specification
file defined:
Bio_Pro_Sci / 研發 / Pi3/DataServer / CC2650 / CC2650通用指令表
Bio_Pro_Sci /  / Pi3/DataServer / CC2650 / CC2650誘銵
```
struct instruction {
@@ -98,7 +98,7 @@ instruction operator
=====================*/
uint16_t EVENT_MASK = 0;
extern ICall_Semaphore semaphore;
static ICall_Semaphore semaphore;
// clang-format off
#define EVT_ALL 0xFFFF // all event mask
@@ -13,5 +13,5 @@ static void headstage_arm_append_ramp_data(uint8_t *buff) {
buff[1] = (uint8_t)(v << 2);
}
#endif // HEADSTAGE_ARM_H
// HEADSTAGE_ARM_H
#endif
@@ -24,7 +24,7 @@ static void headstage_clock_callback(UArg arg) {
#define headstage_clock_close() \
do { \
Clock_delete(clock_handle); \
Clock_delete(&clock_handle); \
clock_handle = NULL; \
} while (0)
@@ -17,8 +17,8 @@ static void headstage_led_close();
static void headstage_led_send(LEDParameter *led);
static void headstage_led_color(uint8_t color);
static uint8_t headstage_led_set_dark(uint16_t *ins_buf, uint8_t repeat) {
uint8_t *p = ins_buf;
static uint16_t headstage_led_set_dark(uint16_t *ins_buf, uint8_t repeat) {
uint16_t *p = ins_buf;
*p++ = 0;
*p++ = 0;
@@ -36,8 +36,8 @@ static uint8_t headstage_led_set_dark(uint16_t *ins_buf, uint8_t repeat) {
return p - ins_buf;
}
static uint8_t headstage_led_set_bright(uint16_t *ins_buf, uint8_t repeat) {
uint8_t *p = ins_buf;
static uint16_t headstage_led_set_bright(uint16_t *ins_buf, uint8_t repeat) {
uint16_t *p = ins_buf;
*p++ = 0;
*p++ = 0;
@@ -55,8 +55,8 @@ static uint8_t headstage_led_set_bright(uint16_t *ins_buf, uint8_t repeat) {
return p - ins_buf;
}
static uint8_t headstage_led_set_buffer(uint16_t *ins_buf, uint8_t repeat, LEDParameter *parameter) {
uint8_t *p = ins_buf;
static uint16_t headstage_led_set_buffer(uint16_t *ins_buf, uint8_t repeat, LEDParameter *parameter) {
uint16_t *p = ins_buf;
*p++ = 0;
*p++ = 0;
@@ -269,12 +269,27 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
static void headstage_update_vis_instruction(uint8_t vis_oper) {
switch (vis_oper) {
case VIS_ASK:
case VIS_INT:
case VIS_FUH:
case VIS_CAL:
case VIS_STI:
case VIS_RST:
case VIS_ASK:{
break;
}
case VIS_INT:{
break;
}
case VIS_FUH:{
break;
}
case VIS_CAL:{
break;
}
case VIS_STI:{
break;
}
case VIS_RST:{
break;
}
default :{
break;
}
}
}
@@ -28,11 +28,11 @@ static PIN_Config headstage_pin_configuration[] = { //
PIN_ADC_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_DAC_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_ENABLE_V10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_ENABLE_V05 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_ENABLE_V10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
// turn off power
PIN_SHUTDOWN_6994 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL ,
PIN_SHUTDOWN_6994 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_SWITCH_ON | PIN_INPUT_EN | PIN_PULLDOWN,
@@ -183,7 +183,7 @@ typedef struct {
static ICall_EntityID self;
// Semaphore globally used to post events to the application thread
static ICall_Semaphore semaphore;
//static ICall_Semaphore semaphore;
// Queue object used for app messages
static Queue_Struct application_message;
@@ -535,7 +535,9 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
headstage_init_device_info();
headstage_init();
headstage_led_color(COLOR_POWER_ON);
// headstage_led_color(COLOR_POWER_ON);
headstage_pin_output(PIN_ENABLE_V05, 1);
for (;;) {
// Waits for a signal to the semaphore associated with the calling thread.