Usually the university takes half of any funds, faculty takes half, and whatever is left over is split between the associated academics.
You were lucky, as most university contracts clearly state they own all associated IP created while working on campus. They could have legally given you $0, and end of employment notice. These things can get messy fast. =3