1939 US v Miller was heard by SCOTUS.  The issue was whether a shotgun having a barrel less than 18 inches was a protected arms It examined the declarative clause. Common in the 18th century and state one or more purposes to be achieved. 
The Court determined that "...ordinarily when called for service these men were expected to bearing arms supplied by themselves." "To preserve the efficiency and preservation of the militia the declaration and guarantee were made." The Court then reviewed State court decisions striking down assault weapons bans...all 16 held that Americans had the right to use, possess and bear arms that were "any part of ordinary military equipment." Followed Aymette "If the citizens have these arms in their hands, they are prepared in the best possible manner to repel encroachments on their rights, etc."
In 2008 in DC v Heller the court expanded the too narrow holding in 1939 striking down AK 47 and AR 15 handgun and non military bans now holding all arms protected.