summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Naik2020-04-07 00:42:05 -0400
committerAditya Naik2020-04-07 00:42:05 -0400
commit2aa5ae87f96b4c10ea52b29e356d1eed6103e3e8 (patch)
tree7c19c417238c9b0bd7f838b367a0e763f4f7bfcf
parent88e041cb910f5d238cd5775921a339f529cbc3b1 (diff)
Branching off main hs
-rw-r--r--Inc/devices.h2
-rw-r--r--Src/main-hs.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/Inc/devices.h b/Inc/devices.h
index 396ae2d..58bc5b7 100644
--- a/Inc/devices.h
+++ b/Inc/devices.h
@@ -33,7 +33,7 @@ typedef enum state {
OFFLINE = 0, /* Device not found on bus */
CONNECTED = 1, /* Device found on bus but handshake not completed */
REGISTERED = 2, /* Completed handshake; ready for action */
- HS_FAILED = 3, /* Handshake failed */
+ FAILED = 3, /* Handshake failed */
NO_DATA = 4 /* ??? */
} state_t;
diff --git a/Src/main-hs.c b/Src/main-hs.c
index 7db3e7a..66d4dd6 100644
--- a/Src/main-hs.c
+++ b/Src/main-hs.c
@@ -72,7 +72,9 @@ static void MX_GPIO_Init(void);
static void MX_I2C1_Init(void);
static void MX_USART1_UART_Init(void);
/* USER CODE BEGIN PFP */
-bool encode_subscription_callback(pb_ostream_t *ostream, const pb_field_t *field, void * const *arg);
+bool decode_subscriptions_callback(pb_istream_t *istream, const pb_field_t *field, void **args);
+int handshake(uint32_t i2c_addr);
+
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
@@ -554,6 +556,12 @@ bool encode_subscription_callback(pb_ostream_t *ostream, const pb_field_t *field
}
return true;
}
+
+int handshake(uint32_t i2c_addr)
+{
+
+ return 1;
+}
/* USER CODE END 4 */
/**