Core: Transmit_ack function with parameter

Simplified toggle bit accounting in the case of an error.
The function transmit_ack() gets the toggle bit as a parameter and constructs the ack message based on that parameter.

Signed-off-by: Christina Quast <chrysh.ng+github@gmail.com>
Core: Corrected resp_cmd error

The response command variable was static and never set

Signed-off-by: Christina Quast <chrysh.ng+github@gmail.com>