Brain-inspired neuromorphic electronics of 2D materials: synapses to hardware systems