Split code between two PRUs and restructure.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>