Development of a closed-loop, implantable, electroceutical device for gastric disorders