-/** Flag variable if pwm was initialized and is ready to start **/
-uint8_t hbr_pwm_initialized = 0;
-/** SPI message format definition for watchdog reset command **/
+
+/**
+ * @brief SPI callback function
+ *
+ * This function is called each time SPI transfer finishes.
+ * Gets response and prepare command for next sending.
+ * Copy response from shadow variable,
+ * Copy prepared command to shadow variable
+ *
+ * @param[in] ifc Pointer to SPI driver structure
+ * @param[in] code SPI transfer status code
+ * @param[in] msg Pointer to message definition structure
+ *
+ * @return always zero
+ */
+int drv_hbr_spi_wdg_callback(struct spi_drv* ifc, int code,
+ struct spi_msg_head* msg)
+{
+ if (code == SPI_MSG_FINISHED) {
+ hbr_spi_wdg_rx = hbr_spi_wdg_rx_shd;
+ hbr_spi_wdg_tx_shd = hbr_spi_wdg_tx;
+ }
+ return 0;
+}
+
+
+// SPI message format definition for watchdog reset command