Skip to content

Commit ecf488a

Browse files
Merge pull request #393 from the-snowwhite/hm2
Hostmot2_ol unset output pins upon exit
2 parents b203148 + c81c362 commit ecf488a

File tree

1 file changed

+6
-1
lines changed
  • src/modules/managed/drivers/hostmot2/hostmot2_soc_ol/src

1 file changed

+6
-1
lines changed

src/modules/managed/drivers/hostmot2/hostmot2_soc_ol/src/hm2_soc_ol.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,12 @@ static int delete(const char *name, void *inst, const int inst_size)
625625
{
626626
hm2_soc_t *brd = (hm2_soc_t *)inst;
627627
char buf[MAXNAMELEN];
628-
628+
u32 index;
629+
// Unset outputs
630+
for(u32 i=0;i<20;i=i+4) {
631+
index=(u32)(0x1100 + i);
632+
*((u32 *)(brd->base + index)) = 0;
633+
}
629634
// explicitly free locally allocated strings in case realtime
630635
// continues to run after shutdown of this driver
631636
if(brd->config != NULL)

0 commit comments

Comments
 (0)