refine flexbus.c and flexbus.h