MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / set_drive_flags

Function set_drive_flags

FluxEngine.cydsn/main.c:140–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static void set_drive_flags(struct set_drive_frame* flags)
141{
142 if (current_drive_flags.drive != flags->drive)
143 {
144 stop_motor();
145 homed = false;
146 }
147
148 current_drive_flags = *flags;
149 DRIVESELECT_REG_Write(flags->drive ? 2 : 1); /* select drive 1 or 0 */
150 DENSITY_REG_Write(!flags->high_density); /* double density bit */
151 INDEX_REG_Write(flags->index_mode);
152}
153
154static void start_motor(void)
155{

Callers 3

start_motorFunction · 0.85
cmd_set_driveFunction · 0.85
mainFunction · 0.85

Calls 1

stop_motorFunction · 0.85

Tested by

no test coverage detected