Code optimize, and another autor is Hui Chen to do the part of rt-thread port to or1200.

Signed-off-by: Shanjin Yang <sjyang@credosemi.com>